capsule-pocket / README.md
ARotting's picture
Publish Dynamic-routing capsule classifier and matched MLP
79aa228 verified
|
Raw
History Blame Contribute Delete
897 Bytes
---
title: Capsule Pocket
emoji: ๐Ÿ’Š
colorFrom: purple
colorTo: yellow
sdk: gradio
sdk_version: "6.5.1"
app_file: app.py
pinned: false
---
# Capsule Pocket
Capsule Pocket trains seven primary capsules and ten eight-dimensional digit
capsules with three rounds of routing by agreement. An ordinary MLP with exactly
the same 4,060 trainable parameters is the control.
The benchmark separates clean accuracy from one-pixel translation and center
occlusion robustness. The Space exposes the ten digit-capsule vector lengths for
each transformed input.
## Verified local result
At exactly 4,060 parameters, capsules reached 97.04% clean accuracy versus 97.41%
for the MLP. They improved one-pixel translation accuracy from 44.72% to 46.20%
and center-occlusion accuracy from 79.63% to 82.22%.
```bash
uv run python projects/capsule-pocket/train.py
uv run pytest tests/test_capsule_pocket.py
```