TensorFlow implementation of Dynamic Routing Between Capsules.
Created and tested using:
- Python 3.5
- TensorFlow 1.4
- tensorflow
- numpy
- tqdm
- matplotlib
pip install -r requirements.txt
Or for GPU TensorFlow:
pip install -r requirements-gpu.txt
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 on MNIST:
- Refactor to be more consistent with Matrix Capsules with EM Routing implementation