# gram-ai/capsule-networks

A PyTorch implementation of the NIPS 2017 paper "Dynamic Routing Between Capsules".

Repository: https://github.com/gram-ai/capsule-networks
Canonical: https://ross.abutalabs.com/products/capsule-networks
Homepage: https://arxiv.org/abs/1710.09829
Language: Python
License Family: other
Topics: capsule-networks, mnist, pytorch, machine-learning
Last push: 2018-11-09T05:23:09+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3226, "days_push": 2854, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1754, forks 312 (observed 2026-08-28T04:05:32.027816+00:00)

## What it is
A barebones CUDA-enabled PyTorch implementation of the CapsNet architecture from the NIPS 2017 paper 'Dynamic Routing Between Capsules' by Sabour, Frosst, and Hinton. It trains on MNIST with dynamic routing-by-agreement, achieving up to 99.7% test accuracy.

## Use cases
- implement capsule networks in pytorch
- reproduce capsnet mnist results
- learn dynamic routing between capsules
- study capsule network architecture code
- train a capsule network on mnist
- compare capsule networks to convolutional nets on overlapping digits

## When to choose
- you want a minimal, readable PyTorch reference implementation of CapsNet
- you need to reproduce or experiment with dynamic routing on MNIST
- you have a CUDA GPU and want quick training benchmarks

## When to avoid
- you need a maintained, production-ready library - the repo is unmaintained with no license
- you need capsule networks on datasets beyond MNIST
- you need a framework-agnostic or TensorFlow/Keras implementation

## Facets
- artifact type: library
- maturity: abandoned
- function: machine-learning, deep-learning, image-processing
- domain: deep-learning, computer-vision, machine-learning
- platform: python, windows
- tags: capsule-networks, pytorch, mnist, capsnet, dynamic-routing, research-code, cuda, gpu, linux, macos

## Member repositories
- gram-ai/capsule-networks (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:32.027816+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:28:07.525266+00:00, confidence not recorded.
  - readme: https://github.com/gram-ai/capsule-networks (fetched 2026-08-28T04:05:32.027816+00:00, sha c8f8629e6481)
  - homepage: https://arxiv.org/abs/1710.09829 (fetched 2026-08-29T11:06:12.493161+00:00, sha a7d431d3543d)
  - site_page: https://info.arxiv.org/about/donate.html (fetched 2026-08-29T11:06:12.502199+00:00, sha cca9c3a11c56)
  - site_page: https://info.arxiv.org/about/ourmembers.html (fetched 2026-08-29T11:06:12.505573+00:00, sha 47cbc55ff1de)
  - site_page: https://info.arxiv.org/about (fetched 2026-08-29T11:06:12.508288+00:00, sha a1f16f915a9a)
  - site_page: https://info.arxiv.org/labs/index.html (fetched 2026-08-29T11:06:12.503972+00:00, sha b14a8d05a0ec)
- Data as of 2026-08-30T08:39:29.467469+00:00.
