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%.

uv run python projects/capsule-pocket/train.py
uv run pytest tests/test_capsule_pocket.py

Hosted showcase

This free static Space preserves the complete original Gradio source, trained artifacts, evaluation files, and local launch requirements. Hugging Face now requires PRO for CPU-backed Gradio hosting, so the public landing page is static while the checked-in app.py remains the authoritative runnable demo.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support