https://github.com/tonysy/capsulenet-pytorch
Implemention of CapsNet from the paper Dynamic Routing Between Capsules
https://github.com/tonysy/capsulenet-pytorch
Last synced: 5 months ago
JSON representation
Implemention of CapsNet from the paper Dynamic Routing Between Capsules
- Host: GitHub
- URL: https://github.com/tonysy/capsulenet-pytorch
- Owner: tonysy
- License: mit
- Created: 2017-11-02T07:38:47.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-07T06:57:08.000Z (over 7 years ago)
- Last Synced: 2025-01-06T03:02:18.614Z (5 months ago)
- Language: Python
- Homepage:
- Size: 21.5 KB
- Stars: 10
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CapsNet-PyTorch
I hvae crated `CapsuleConv` for PrimaryCapsule, `CapsuleLinear` for DigitCapsule
*minist_toy_example.py*: minist example from pytorch github code repo
# Usage
## Step-1: Set your environment
```
virtualenv -p python3 --no-site-packages .capsule_envsource .capsule_env/bin/activate
pip3 install http://download.pytorch.org/whl/cu80/torch-0.2.0.post3-cp35-cp35m-manylinux1_x86_64.whl
pip3 install torchvision
```
## Step-2: Run```
CUDA_VISIBLE_DEVICES=2 python main.py
```# Todo
1. Test for cifar10
2. Re-Implement EM-Routing# Other Implementations
- Kaggle (this version as self-contained notebook):
- [MNIST Dataset](https://www.kaggle.com/kmader/capsulenet-on-mnist) running on the standard MNIST and predicting for test data
- [MNIST Fashion](https://www.kaggle.com/kmader/capsulenet-on-fashion-mnist) running on the more challenging Fashion images.
- TensorFlow:
- [naturomics/CapsNet-Tensorflow](https://github.com/naturomics/CapsNet-Tensorflow.git)
Very good implementation. I referred to this repository in my code.
- [InnerPeace-Wu/CapsNet-tensorflow](https://github.com/InnerPeace-Wu/CapsNet-tensorflow)
I referred to the use of tf.scan when optimizing my CapsuleLayer.
- [LaoDar/tf_CapsNet_simple](https://github.com/LaoDar/tf_CapsNet_simple)- PyTorch:
- [nishnik/CapsNet-PyTorch](https://github.com/nishnik/CapsNet-PyTorch.git)
- [timomernick/pytorch-capsule](https://github.com/timomernick/pytorch-capsule)
- [gram-ai/capsule-networks](https://github.com/gram-ai/capsule-networks)
- [andreaazzini/capsnet.pytorch](https://github.com/andreaazzini/capsnet.pytorch.git)
- [leftthomas/CapsNet](https://github.com/leftthomas/CapsNet)
- MXNet:
- [AaronLeong/CapsNet_Mxnet](https://github.com/AaronLeong/CapsNet_Mxnet)
- Lasagne (Theano):
- [DeniskaMazur/CapsNet-Lasagne](https://github.com/DeniskaMazur/CapsNet-Lasagne)- Chainer:
- [soskek/dynamic_routing_between_capsules](https://github.com/soskek/dynamic_routing_between_capsules)