pytorch-capsule-networks
pytorch-capsule-networks copied to clipboard
PyTorch Implementation of Capsule Networks in NIPS2017 and ICLR2018
trafficstars
PyTorch Implementation of Capsule Networks in NIPS2017 and ICLR2018
This repository is a PyTorch implementation of the following papers ([1] and [2]):
@incollection{NIPS2017_6975,
title = {Dynamic Routing Between Capsules},
author = {Sabour, Sara and Frosst, Nicholas and Hinton, Geoffrey E},
booktitle = {Advances in Neural Information Processing Systems 30},
editor = {I. Guyon and U. V. Luxburg and S. Bengio and H. Wallach and R. Fergus and S. Vishwanathan and R. Garnett},
pages = {3856--3866},
year = {2017},
publisher = {Curran Associates, Inc.},
url = {http://papers.nips.cc/paper/6975-dynamic-routing-between-capsules.pdf}
}
@inproceedings{
e2018matrix,
title={Matrix capsules with {EM} routing},
author={Geoffrey E Hinton and Sara Sabour and Nicholas Frosst},
booktitle={International Conference on Learning Representations},
year={2018},
url={https://openreview.net/forum?id=HJWLfGWRb},
}
You can also refer to the official TensorFlow implemenation of the first paper, which is provided by the first author Sara Sabour.
Capsule framework

Image credits: @bojone
How to run?
CUDA_VISIBLE_DEVICES=0 python main.py
Please see main.py and config.yaml for more details.
tensorboard --logdir='./logs' --port=6006 # TensorBoard Visualization
Acknowledgements
Thanks to @danielhavir and @ducminhkhoi
Other Implementations of CapsNet in NIPS 2017
-
PyTorch:
-
Keras:
-
TensorFlow:
-
MXNet:
-
Chainer:
-
Matlab:
Other Implementations of CapsNet in ICLR 2018
- PyTorch: