A Tensorflow implementation of CapsNet in Hinton's paper Dynamic Routing Between Capsules
The code is not complete yet, I'm trying to finish it as quickly as possible. Here is my understanding of this paper on section 4(the core part of CapsNet). Thanks for your focus
- Python
- NumPy
- Tensorflow (I'm using 1.3.0, others should work, too)
Step 1.
Clone this repository with git
.
$ git clone https://github.com/naturomics/CapsNet-Tensorflow.git
$ cd CapsNet-Tensorflow
Step 2.
Download MNIST dataset, mv
and extract them into data/mnist
directory.(Be careful the backslash appeared around the curly braces when you copy the wget
command to your terminal, remove it)
$ mkdir -p data/mnist
$ wget -c -P data/mnist http://yann.lecun.com/exdb/mnist/{train-images-idx3-ubyte.gz,train-labels-idx1-ubyte.gz,t10k-images-idx3-ubyte.gz,t10k-labels-idx1-ubyte.gz}
$ gunzip data/mnist/*.gz
Step 3. Start training with command line:
$ python train.py
python eval.py