All models

capsnet_cifar10_dynamic_routing

A shallow capsule network that classifies images using dynamic routing between capsules.

Image classification · 95 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (61 KB)

Open in a new tab

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.

At a glance

Family
CapsNet
Parameters
22.5M
Operations
95
Framework
PyTorch
Recurrent
Yes
Published
NeurIPS 2017
Cited by
4,080 (as of 22 October 2026)
Authors
Sara Sabour, Nicholas Frosst, Geoffrey E. Hinton
License
Apache-2.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m3748
Graph hash
f8da3fa3052aeab5792dc59a19327604c5f13694b6d8d5fccb0acd88b0d98f9b
Skeleton hash
7e7702e93972622483882ba99226b16a0de50e0532627e6b3f5018a96933a5c9
Architecture hash
866801d3ba3472a88f5bfcfa7edaa6c12bb1390a18e9e87fa990ac14ee39871e
Diagram SHA-256
9d0e04abdccf09f2955c884e21b14154c03ff36df24c4c1a5e776ea4eb8bf499
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

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.

  • capsnet
  • capsule network
  • capsule networks
  • dynamic routing between capsules
  • dynamic routing
  • routing-by-agreement
  • capsules
  • mnist capsule network
  • cifar10 capsule network

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@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}, 
}