spherenet

Deep Hyperspherical Learning.


Keywords
ai, neural, networks, machine, learning, ml
License
BSD-3-Clause
Install
pip install spherenet==0.0.3

Documentation

spherenet

This is an implementation of Deep Hyperspherical Learning. Deep Hyperspherical Learning is a simple modification to the convolution operator that speeds up convergence and improves accuracy on some tasks.

Usage

Install the spherenet package:

pip install spherenet

SphereConv layers

To use a SphereConv layer, do something like this:

from spherenet import sphere_conv

...

output = sphere_conv(input_image, NUM_FILTERS, KERNEL_SIZE, strides=STRIDE,
                     variant='sigmoid', sigmoid_k=0.3)

The variant argument can be linear, cosine, or sigmoid. You can also pass a regularization argument to specify a regularization coefficient, in which case a regularization term is added to tf.GraphKeys.REGULARIZATION_LOSSES.

In general, the sphere_conv function is similar to tf.layers.conv2d. For complete usage of sphere_conv, run:

python -c 'import spherenet; help(spherenet.sphere_conv)'