All Projects → chrislybaer → capsules-tensorflow

chrislybaer / capsules-tensorflow

Licence: Apache-2.0 license
Another implementation of Hinton's capsule networks in tensorflow.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to capsules-tensorflow

CapsNet-tensorflow-jupyter
A simple tensorflow implementation of CapsNet (by Dr. G. Hinton), based on my understanding. This repository is built with an aim to simplify the concept, implement and understand it.
Stars: ✭ 16 (-11.11%)
Mutual labels:  hinton, capsnet, capsule-network
CapsNet
Empirical studies on Capsule Network representation and improvements implemented with PyTorch.
Stars: ✭ 39 (+116.67%)
Mutual labels:  hinton, capsnet, capsule-network
Capsnet Keras
A Keras implementation of CapsNet in NIPS2017 paper "Dynamic Routing Between Capsules". Now test error = 0.34%.
Stars: ✭ 2,428 (+13388.89%)
Mutual labels:  capsnet, capsule-network
Capsnet Tensorflow
A Tensorflow implementation of CapsNet(Capsules Net) in paper Dynamic Routing Between Capsules
Stars: ✭ 3,776 (+20877.78%)
Mutual labels:  capsnet, capsule-network
Capsnet Traffic Sign Classifier
A Tensorflow implementation of CapsNet(Capsules Net) apply on german traffic sign dataset
Stars: ✭ 166 (+822.22%)
Mutual labels:  capsnet, capsule-network
Variational Capsule Routing
Official Pytorch code for (AAAI 2020) paper "Capsule Routing via Variational Bayes", https://arxiv.org/pdf/1905.11455.pdf
Stars: ✭ 84 (+366.67%)
Mutual labels:  capsnet, capsule-network
heinsen routing
Official implementation of "An Algorithm for Routing Capsules in All Domains" (Heinsen, 2019) in PyTorch.
Stars: ✭ 41 (+127.78%)
Mutual labels:  capsule-network, capsules
Capsnet Visualization
🎆 A visualization of the CapsNet layers to better understand how it works
Stars: ✭ 371 (+1961.11%)
Mutual labels:  capsnet, capsule-network
Capsule Net Pytorch
[NO MAINTENANCE INTENDED] A PyTorch implementation of CapsNet architecture in the NIPS 2017 paper "Dynamic Routing Between Capsules".
Stars: ✭ 158 (+777.78%)
Mutual labels:  capsnet, capsule-network
Capslayer
CapsLayer: An advanced library for capsule theory
Stars: ✭ 351 (+1850%)
Mutual labels:  capsnet, capsule-network
Capsule Gan
Code for my Master thesis on "Capsule Architecture as a Discriminator in Generative Adversarial Networks".
Stars: ✭ 120 (+566.67%)
Mutual labels:  capsnet, capsule-network
capsnet.mxnet
MXNet implementation of CapsNet
Stars: ✭ 30 (+66.67%)
Mutual labels:  hinton, capsnet
tf CapsNet
A tensorflow implementation for CapsNet
Stars: ✭ 19 (+5.56%)
Mutual labels:  capsnet, capsules
LightCapsNet
A Matlab implementation of the capsule networks (or capsnet).
Stars: ✭ 47 (+161.11%)
Mutual labels:  capsule-network
Matrix Capsules With Em Routing
A TensorFlow implementation of "Matrix Capsules with EM Routing" by Hinton et al. (2018).
Stars: ✭ 74 (+311.11%)
Mutual labels:  capsnet
Capsnet Nlp
CapsNet for NLP
Stars: ✭ 66 (+266.67%)
Mutual labels:  capsnet
Capsnet Pytorch
PyTorch implementation of NIPS 2017 paper Dynamic Routing Between Capsules
Stars: ✭ 440 (+2344.44%)
Mutual labels:  capsnet
Dynamic routing between capsules
Implementation of Dynamic Routing Between Capsules, Sara Sabour, Nicholas Frosst, Geoffrey E Hinton, NIPS 2017
Stars: ✭ 202 (+1022.22%)
Mutual labels:  capsnet
Capsnet
CapsNet (Capsules Net) in Geoffrey E Hinton paper "Dynamic Routing Between Capsules" - State Of the Art
Stars: ✭ 423 (+2250%)
Mutual labels:  capsnet
CapsNet-Fashion-MNIST
Capsule Network on Fashion MNIST dataset
Stars: ✭ 93 (+416.67%)
Mutual labels:  capsnet

capsules-tensorflow

Another implementation of Hinton's capsule networks in tensorflow. At the moment the implementation provides the means to set up the model presented in Dynamic Routing Between Capsules.

Results:

Results of this implementation on MNIST with batch size 256, learning rate decay 0.95, regularization weight 0.4:

Epochs Routing Iterations Regularization Accuracy
20 1 Off 99.51%
20 1 On 99.62%
20 3 Off 99.30%
20 3 On 99.47%
500 1 On 99.55%
500 3 On 99.50%

Here are some reconstructions of testset digits obtained by the encoder of a capsnet trained on MNIST for 20 and 100 epochs with regularization and iter_routing=2:

The odd lines contain the input digits and the even lines the reconstructed digits. For the reconstruction the orientation of the longest DigitCapsule vector is used.

Reconstructions for the fashion MNIST dataset after 10 epochs with regularization and iter_routing=2:

Implemented:

  • fully connected capsule layers with routing (capsule.py)
  • convolutional capsule layers without routing (capsule.py)
  • regularization (main_mnist_capsnet.py)

TODO:

  • train for many epochs
  • convoutional capsule layers with routing
  • speed things up

For a minimal example please have a look at: main_mnist_capsnet.py. In this file a CapsNet with the architecture proposed in the linked paper is trained on the MNIST dataset.

I am new to tensorflow, therefore, feedback regarding coding style or mistakes is appreciated!

Other Implementations:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].