A simple Pytorch implementation of Capsule Networks by Dynamic Routing algorithm.
Related Paper: Dynamic Routing Between Capsules
Running tests on Mnist and Cifar10 data sets.
Loss Functions: Margin Loss and Reconstruction Loss
Decoder (Fully Connected Layers) Module
Digit Capsule Layer Module
Primary Capsule Layer Module
Convolutional Layer Module
Data Module