Capsule theory is a potential research proposed by Geoffrey E. Hinton et al, where he describes the shortcomings of the Convolutional Neural Networks and how Capsules could potentially circumvent these problems such as "pixel attack" and create more robust Neural Network Architecture based on Capsules Layer.
We expect that this theory will definitely contribute to Deep Learning Industry and we are excited about it. For the same reason we are proud to introduce CapsLayer, an advanced library for the Capsule Theory, integrating capsule-relevant technologies, providing relevant analysis tools, developing related application examples, and probably most important thing: promoting the development of capsule theory.
This library is based on Tensorflow and has a similar API with it but designed for capsule layer/model. We will soon be testing it with TensorFlow 1.4.x as well as TensorFlow 1.5.x which introduces several imperative modules such as Eager Execution etc.
Here is a simple example of probability of entity presence wirh MNIST dataset when running vecCapsNet activations
-
TensorFlow-like API for building Neural Nets block:
- capslayer.layers.conv2d
- capslayer.layers.fully_connected
- capslayer.layers.primaryCaps
- capslayer.losses.spread_loss
- capslayer.losses.margin_loss
-
Datasets support:
-
Capsule Nets Model examples:
- Dynamics routing between capsules
- matrix capsule with EM routing(will be released soon)
-
Algorithm support:
- Routing-by-agreement: including EM Routing and Dynamic Routing
- Non-local Neural Networks
If you want us to support more features, please tell us by opening an Issue or sending E-mail to naturomics.liao@gmail.com
Feel free to send your pull request or open an issue
If you find it is useful, please cite our project by the following BibTex entry:
@misc{HuadongLiao2017,
title = {CapsLayer: An advanced library for capsule theory},
author = {Huadong Liao, Jiawei He},
year = {2017}
publisher = {GitHub},
journal = {GitHub Project},
howpublished = {\url{http://naturomics.com/CapsLayer}},
}
Note: We are considering to write a paper for this project, but before that, cite the above Bibtex entry.
Apache 2.0 license.