Kears implementation of CapsuleNet [1] based on the already existing implementations [2] and [3].
- capsnet.py can be used for both, training and testing. During tests call it via -t and -w to set the weights file
- Test augmentation parameters such as rotation, shift etc. can be set in the test_generator (currently its not a cmd arg)
- Added epsilon to margin_loss to avoid numerical errors during forward pass
- All parameters of [1] are set as default. Some of those can be changed as cmd arg.
[1] Sabour et al., Dynamic Routing Between Capsules, NIPS 2017
[2] XifengGuo/CapsNet-Keras
[3] wballard/CapsNet-Keras