Skip to content

unixpickle/spherenet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 

Repository files navigation

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)'

About

Implementing Deep Hyperspherical Learning

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages