/DynamicRoutingBetweenCapsules

Implementation of 'Dynamic Routing Between Capsules' in TensorFlow

Primary LanguagePython

Dynamic Routing Between Capsules

TensorFlow implementation of Dynamic Routing Between Capsules.

Requirements

Created and tested using:

  • Python 3.5
  • TensorFlow 1.4

Packages

  • tensorflow
  • numpy
  • tqdm
  • matplotlib
pip install -r requirements.txt

Or for GPU TensorFlow:

pip install -r requirements-gpu.txt

Usage

To train a model on MNIST with default parameters:

python main.py

To test a trained model:

python main.py --test True --result_dir <result_dir>

Additional command line arguments are detailed in main.py.

Results

Results on MNIST:

MNIST Results

Notes

TODO

  • Refactor to be more consistent with Matrix Capsules with EM Routing implementation

Reference

  1. Dynamic Routing Between Capsules
  2. Project structure