
capsnet_mnist_dynamic_routing
Image classification90 ops8.2M params
A shallow capsule network that classifies images using dynamic routing between capsules.
Image classification · 95 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
This model is the CIFAR10 configuration, which the paper describes as the simple MNIST architecture with three color channels and 64 different types of primary capsule.
About this model's family
CapsNet is a small image classifier built from capsules, groups of neurons whose activity vector describes one entity such as an object or an object part. The length of a capsule's vector represents the probability that the entity exists, and its orientation represents the entity's instantiation parameters. Capsule layers are connected by routing-by-agreement, an iterative procedure in which a lower-level capsule sends its output to the higher-level capsules whose activity agrees with its prediction.
The architecture is shallow, with only two convolutional layers and one fully connected layer. The final layer, DigitCaps, has one 16D capsule per digit class, and each receives input from all the capsules in the layer below. As a regularizer, a decoder of 3 fully connected layers reconstructs the input image from the output of the digit capsule.
The paper reports a 0.25% test error on MNIST with this 3 layer network. It counts 8.2M parameters for CapsNet, or 6.8M without the reconstruction subnetwork. On CIFAR10 the authors report 10.6% error with an ensemble of 7 models, each trained with 3 routing iterations on 24 × 24 patches of the image.
Key idea. The paper shows that a multi-layer system of capsules with iterative routing-by-agreement recognizes highly overlapping digits considerably better than a convolutional net.
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
@misc{sabour2017dynamicroutingcapsules,
title={Dynamic Routing Between Capsules},
author={Sara Sabour and Nicholas Frosst and Geoffrey E Hinton},
year={2017},
eprint={1710.09829},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/1710.09829},
}