SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1904.09546 · 2019

DeepCaps: Going Deeper with Capsule Networks

arXiv · PDF · Open in the Atlas

Code that ran

6 of 19 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 3 failures of our instrument; 13 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1904.09546.json · badge: /api/ran/1904.09546.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
brjathu/deepcaps canonical (classifier label)
classifier basis: classifier_2025
0 ran · 2 no recorded run
Ugenteraan/Deep-CapsNet community (classifier label)
classifier basis not recorded on the link
3 ran · 3 no recorded run
HopefulRational/DeepCaps-PyTorch reimplementation (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
mfarhadi98/Use-Capsule-Networks-for-kddcup community (classifier label)
classifier basis not recorded on the link
0 ran · 8 no recorded run
FunctionStatusWhere it lives
accuracy_calc Ran
ran on a synthesized input
Ugenteraan/Deep-CapsNet/helpers.py
code served (permissive licence) · get_code("fa4c5ee790cb72e8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create small tensors for predictions and labels
# predictions: model outputs (class indices or one-hot)
# labels: ground truth labels
# The function uses .size()[0] to get batch size and compares == element-wise

predictions = torch.tensor([0, 1, 0, 2], dtype=torch.long)
labels = torch.tensor([0, 1, 1, 2], dtype=torch.long)

ARGS = {
    "predictions": predictions,
    "labels": labels
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
apply_transform Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
HopefulRational/DeepCaps-PyTorch/deepcaps.py
pointer only (licence: NONE) · get_code("e6a27797b1e22e76")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, HopefulRational/DeepCaps-PyTorch when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

onehot_encode Ran
ran on a synthesized input
Ugenteraan/Deep-CapsNet/helpers.py
code served (permissive licence) · get_code("077a8a0fd50b76e8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (4, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create a small integer tensor with class indices
# Using values in range [0, num_classes-1]
tensor = torch.tensor([0, 2, 1, 3], dtype=torch.long)

# Number of classes for one-hot encoding
num_classes = 4

# Device to use (CPU only)
device = 'cpu'

ARGS = {
    'tensor': tensor,
    'num_classes': num_classes,
    'device': device,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (4, 4) — shape (4, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
squash Ran
ran; our contract draft was wrong, not the code
HopefulRational/DeepCaps-PyTorch/deepcaps.py
pointer only (licence: NONE) · get_code("4ac5c90dc72f57f2")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, HopefulRational/DeepCaps-PyTorch when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

squash Ran
ran on a synthesized input
Ugenteraan/Deep-CapsNet/model.py
code served (permissive licence) · get_code("d3b03a5a3ef29c68")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create a small tensor for capsules
# Shape: (batch_size=2, capsule_dim=4)
caps = torch.randn(2, 4)

# The function uses dim=-1 by default, but we can test with explicit value
dim = -1

# eps is used in the computation for numerical stability
eps = 1e-08

ARGS = {
    "caps": caps,
    "dim": dim,
    "eps": eps,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
transform_matrix_offset_center Ran
ran; our contract draft was wrong, not the code
HopefulRational/DeepCaps-PyTorch/deepcaps.py
pointer only (licence: NONE) · get_code("f1391c2b4e040dc5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, HopefulRational/DeepCaps-PyTorch when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

check_path Not yet run
unverified (harvested, no recorded run)
Ugenteraan/Deep-CapsNet/helpers.py
code served (permissive licence) · get_code("1e64c1aa4a018162")
How it ran

no invocation recorded.

ensemble Not yet run
unverified (harvested, no recorded run)
brjathu/deepcaps/ensemble.py
code served (permissive licence) · get_code("318b1bac54fc918c")
How it ran

no invocation recorded.

load_tiny_imagenet Not yet run
unverified (harvested, no recorded run)
mfarhadi98/Use-Capsule-Networks-for-kddcup/load_datasets.py
code served (permissive licence) · get_code("ab20cb2a9465041f")
How it ran

no invocation recorded.

margin_loss Not yet run
unverified (harvested, no recorded run)
mfarhadi98/Use-Capsule-Networks-for-kddcup/utils.py
code served (permissive licence) · get_code("2ae5d6a1a27cfeef")
How it ran

no invocation recorded.

margin_loss_hard Not yet run
unverified (harvested, no recorded run)
mfarhadi98/Use-Capsule-Networks-for-kddcup/utils.py
code served (permissive licence) · get_code("548d322c9a961eff")
How it ran

no invocation recorded.

plot_loss_acc Not yet run
unverified (harvested, no recorded run)
Ugenteraan/Deep-CapsNet/plot.py
code served (permissive licence) · get_code("d6064f2398762d42")
How it ran

no invocation recorded.

plot_reconstruction Not yet run
unverified (harvested, no recorded run)
Ugenteraan/Deep-CapsNet/plot.py
code served (permissive licence) · get_code("f253cc72bf174bc3")
How it ran

no invocation recorded.

resize Not yet run
unverified (harvested, no recorded run)
brjathu/deepcaps/ensemble.py
code served (permissive licence) · get_code("aff1bfca07e0988e")
How it ran

no invocation recorded.

resize Not yet run
unverified (harvested, no recorded run)
mfarhadi98/Use-Capsule-Networks-for-kddcup/ensemble.py
code served (permissive licence) · get_code("a4a0420adfe205cb")
How it ran

no invocation recorded.

resize Not yet run
unverified (harvested, no recorded run)
mfarhadi98/Use-Capsule-Networks-for-kddcup/load_datasets.py
code served (permissive licence) · get_code("db68514a2630cd72")
How it ran

no invocation recorded.

squash Not yet run
unverified (harvested, no recorded run)
mfarhadi98/Use-Capsule-Networks-for-kddcup/capslayers.py
code served (permissive licence) · get_code("7c3da8b78efbfce9")
How it ran

no invocation recorded.

squeeze Not yet run
unverified (harvested, no recorded run)
mfarhadi98/Use-Capsule-Networks-for-kddcup/capslayers.py
code served (permissive licence) · get_code("e7e5a13dd8c18121")
How it ran

no invocation recorded.

update_routing Not yet run
unverified (harvested, no recorded run)
mfarhadi98/Use-Capsule-Networks-for-kddcup/capslayers.py
code served (permissive licence) · get_code("464243838acf2e17")
How it ran

no invocation recorded.

Also present in other papers' code

Of 19 samples lifted from this paper's linked repositories, 19 carry a function identity and 0 do not. Of the 19 distinct functions with an identity, 4 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 3 later) and 15 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
transform_matrix_offset_center 3 other papers
1 dated earlier, 2 later
1811.11168 (2018-11)
Deformable ConvNets v2: More Deformable, Better Results
2204.00008 (2022-04)
Improving Adversarial Transferability via Neuron Attribution-based Attacks
2608.11815 (2026-08)
Learning with Bilevel-Minimax Optimization for Efficient and Reliable Transfer Attacks
squash 2 other papers
1 dated earlier, 1 later
1710.09829 (2017-10)
Dynamic Routing Between Capsules
2112.03939 (2021-12)
Photometric Redshifts from SDSS Images with an Interpretable Deep Capsule Network
margin_loss 1 other paper
1 dated earlier
1710.09829 (2017-10)
Dynamic Routing Between Capsules
squeeze 1 other paper
1 later
2112.03939 (2021-12)
Photometric Redshifts from SDSS Images with an Interpretable Deep Capsule Network

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Capsule Network is a promising concept in deep learning, yet its true potential is not fully realized thus far, providing sub-par performance on several key benchmark datasets with complex data. Drawing intuition from the success achieved by Convolutional Neural Networks (CNNs) by going deeper, we introduce DeepCaps1, a deep capsule network architecture which uses a novel 3D convolution based dynamic routing algorithm. With DeepCaps, we surpass the state-of-the-art results in the capsule network domain on CIFAR10, SVHN and Fashion MNIST, while achieving a 68% reduction in the number of parameters. Further, we propose a class-independent decoder network, which strengthens the use of reconstruction loss as a regularization term. This leads to an interesting property of the decoder, which allows us to identify and control the physical attributes of the images represented by the instantiation parameters.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("1904.09546")
get_code_for_paper("1904.09546")
have("1904.09546")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/1904.09546.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/1904.09546.svg)](https://syntology.ai/paper/1904.09546)

Connect an agent — have() is free.