/CapsNet

A tensorflow implemention of CapsNet in Geoffrey Hinton's paper Dynamic Routing Between Capsules

Primary LanguagePythonApache License 2.0Apache-2.0

CapsNet

License

A tensorflow implemention of CapsNet in Geoffrey Hinton's paper Dynamic Routing Between Capsules. NIPS 2017 capsnet

A capsule is a group of neurons whose activity vector represents the instantiation parameters of a specific type of entity such as an object or an object part. We use the length of the activity vector to represent the probability that the entity exists and its orientation to represent the instantiation parameters. Active capsules at one level make predictions, via transformation matrices, for the instantiation parameters of higher-level capsules. When multiple predictions agree, a higher level capsule becomes active.

Requirements

Usage

Step 1. Clone this repository with git.

$ git clone https://github.com/VectorFist/CapsNet.git
$ cd CapsNet

Step 2. Download the MNIST dataset, extract it into MNIST_data directory.

Step 3. Start the training:

$ python run_capsnet.py

Step 4. Test capsnet model:

$ python run_capsnet.py --run_mode=test