SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1710.09829 · 2017

Dynamic Routing Between Capsules

arXiv · PDF · Open in the Atlas

Code that ran

75 of 118 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; 12 honoured the contract we drafted, 1 violated it and 18 have no contract verdict; 44 failures of our instrument; 43 no recorded run), measured 2026-11-22; 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/1710.09829.json · badge: /api/ran/1710.09829.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
Sarasra/models canonical (classifier label)
classifier basis: census
1 ran · 1 no recorded run
ameliajimenez/capsule-networks-medical-data-challenges community (classifier label)
classifier basis not recorded on the link
14 ran · 7 no recorded run
lalonderodney/SegCaps community (classifier label)
classifier basis not recorded on the link
7 ran · 5 no recorded run
JeremyCCHsu/CapsNet-tf community (classifier label)
classifier basis not recorded on the link
6 ran · 0 no recorded run
anastasios-stamoulis/deep-learning-with-csharp-and-cntk community (classifier label)
classifier basis not recorded on the link
4 ran · 3 no recorded run
ethanleet/CapsNet community (classifier label)
classifier basis not recorded on the link
4 ran · 1 no recorded run
www0wwwjs1/Matrix-Capsules-EM-Tensorflow community (classifier label)
classifier basis not recorded on the link
4 ran · 0 no recorded run
naturomics/CapsLayer community (classifier label)
classifier basis not recorded on the link
3 ran · 2 no recorded run
naturomics/CapsNet-Tensorflow community (classifier label)
classifier basis not recorded on the link
2 ran · 2 no recorded run
Egesabanci/capsuleNetworks community (classifier label)
classifier basis not recorded on the link
2 ran · 1 no recorded run
ecstayalive/Degenerate-capsule-neural-network community (classifier label)
classifier basis not recorded on the link
2 ran · 0 no recorded run
gram-ai/capsule-networks reimplementation (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
Cheng-Lin-Li/SegCaps extension (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
hli2020/nn_encapsulation extension (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
Colonel-Hathi/CapsNet-Treemap-Perception-Trafficsign community (classifier label)
classifier basis not recorded on the link
1 ran · 5 no recorded run
XifengGuo/CapsNet-Keras community (classifier label)
classifier basis not recorded on the link
1 ran · 4 no recorded run
lauromoraes/capsnet-promoter community (classifier label)
classifier basis not recorded on the link
1 ran · 3 no recorded run
shashankmanjunath/capsnet reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 2 no recorded run
DanielLongo/CapsNet-PyTorch reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 2 no recorded run
mshaikh2/GANs_Comparison community (classifier label)
classifier basis not recorded on the link
1 ran · 1 no recorded run
JunYeopLee/capsule-networks community (classifier label)
classifier basis not recorded on the link
1 ran · 1 no recorded run
Utkarsh87/Capsule-Networks community (classifier label)
classifier basis not recorded on the link
1 ran · 1 no recorded run
jwwandy/DynamicRoutingBetweenCapsules-PyTorch reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
grassknoted/CDAE4InfoExtraction reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
Ian-Liao/SegCaps extension (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
Decoder Ran
ran on a synthesized input
Egesabanci/capsuleNetworks/src/capsule_networks.py
code served (permissive licence) · get_code("643e4ac03170a791")
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 EagerTensor, ndim 3, dtype family float, shape (2, 4, 3) 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 tensorflow as tf
import numpy as np

# Create a small masked input tensor (batch_size=2, features=16)
masked_input = tf.constant(np.random.randn(2, 16).astype(np.float32))

# Target shape for the output image (e.g., 4x3 for a small image)
target_shape = (4, 3)

# Two dense layer sizes
dense_units = [8, 6]

# Output units (should match product of target_shape for reshaping to work)
output_units = 12  # 4 * 3 = 12

# Activation function
activation = 'relu'

ARGS = {
    'masked_input': masked_input,
    'target_shape': target_shape,
    'dense_units': dense_units,
    'output_units': output_units,
    'activation': activation
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 3, dtype family float, shape (2, 4, 3) — shape (2, 4, 3) 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
UNet Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
lalonderodney/SegCaps/unet.py
code served (permissive licence) · get_code("6c522a777d335f98")
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 Functional. The image it ran in was not recorded. If your copy returns the same type 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.

from keras.models import Model
from keras.layers import Input, concatenate, Conv2D, MaxPooling2D, Conv2DTranspose

# The UNet function takes a single parameter: input_shape
# It's a tuple specifying (height, width, channels)
# The function builds a U-Net model with this input shape

ARGS = {
    "input_shape": (512, 512, 1)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
keras — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Functional — a Functional output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Functional output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
accuracy Ran
ran; our contract draft was wrong, not the code
shashankmanjunath/capsnet/capsule_network.py
code served (permissive licence) · get_code("64858477ea4e51d9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned float64, 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
import numpy as np

torch.manual_seed(0)

# Create y: one-hot encoded labels (batch_size=2, num_classes=5)
y = torch.tensor([
    [0.1, 0.2, 0.6, 0.05, 0.05],  # argmax = 2
    [0.8, 0.1, 0.05, 0.03, 0.02]  # argmax = 0
], dtype=torch.float32)

# Create pred: predicted class indices (batch_size=2)
pred = torch.tensor([2, 0], dtype=torch.long)

ARGS = {
    'y': y,
    'pred': pred
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, 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
add_gaussian_noise Ran
ran, honoured the contract we drafted
ecstayalive/Degenerate-capsule-neural-network/capsule_net/utils/add_noise.py
code served (permissive licence) · get_code("0d412a9be3a2a5d6")
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 ndarray, 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 numpy as np

# Create a small signal array: 2 signals, each with 4 samples
signal = np.random.randn(2, 4).astype(np.float32)

# Create a small SNR value (in dB)
snr = 10.0

ARGS = {
    "signal": signal,
    "snr": snr,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, 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
augmentation Ran
ran; our contract draft was wrong, not the code
gram-ai/capsule-networks/capsule_network.py
pointer only (licence: NONE) · get_code("916d6f93349e426b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gram-ai/capsule-networks 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.

average_gradients Ran
ran on a synthesized input
naturomics/CapsNet-Tensorflow/dist_version/distributed_train.py
code served (permissive licence) · get_code("25474dc6ec455a0d")
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 list. The image it ran in was not recorded. If your copy returns the same type 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 tensorflow as tf

# Create a simple setup for tower_grads
# tower_grads is a list of lists of (gradient, variable) tuples
# Outer list: over individual gradients
# Inner list: over gradient calculation for each tower

# Create 2 towers with 3 shared variables each
tower_grads = []

# Tower 1
tower_1_grads = [
    (tf.constant([[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]]), tf.Variable([[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]])),
    (tf.constant([[9.0, 10.0], [11.0, 12.0], [13.0, 14.0]]), tf.Variable([[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]])),
    (tf.constant([15.0, 16.0, 17.0]), tf.Variable([0.0, 0.0, 0.0])),
]
tower_grads.append(tower_1_grads)

# Tower 2
tower_2_grads = [
    (tf.constant([[1.5, 2.5, 3.5, 4.5], [5.5, 6.5, 7.5, 8.5]]), tf.Variable([[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]])),
    (tf.constant([[9.5, 10.5], [11.5, 12.5], [13.5, 14.5]]), tf.Variable([[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]])),
    (tf.constant([15.5, 16.5, 17.5]), tf.Variable([0.0, 0.0, 0.0])),
]
tower_grads.append(tower_2_grads)

ARGS = {
    "tower_grads": tower_grads,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list output has no array shape of its own; none is stated
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
binarize_grid Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ameliajimenez/capsule-networks-medical-data-challenges/preprocess_diaretdb1.py
code served (permissive licence) · get_code("2e8edc862c5c964a")
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 tuple, ndim 3, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 numpy as np
from scipy.ndimage.measurements import center_of_mass

# Create a small image with some structure
# grid_size will be 300, so we need dimensions divisible by 300
# Let's use 600x600 to get a 2x2 grid
img = np.random.randint(0, 2, size=(600, 600), dtype=np.uint8)

# Create a mask with similar structure
mask = np.zeros((600, 600), dtype=np.uint8)
# Add some non-zero regions in specific grid cells
mask[0:300, 0:300] = np.random.randint(0, 2, size=(300, 300), dtype=np.uint8)
mask[300:600, 300:600] = np.random.randint(0, 2, size=(300, 300), dtype=np.uint8)

# Set grid_size
grid_size = 300

ARGS = {
    "img": img,
    "mask": mask,
    "grid_size": grid_size
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 3, dtype family int — a tuple output has no array shape of its own; none is stated
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
build_dataloaders Ran
ran on a synthesized input
ethanleet/CapsNet/data_loaders.py
code served (permissive licence) · get_code("ef26365c2b293ba7")
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 tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 numpy as np
import torch
from torch.utils.data import Dataset

torch.manual_seed(0)
np.random.seed(0)

class SimpleDataset(Dataset):
    def __init__(self, num_samples=10, input_dim=4, output_dim=3):
        self.num_samples = num_samples
        self.input_dim = input_dim
        self.output_dim = output_dim
    
    def __len__(self):
        return self.num_samples
    
    def __getitem__(self, idx):
        x = torch.randn(self.input_dim)
        y = torch.randint(0, self.output_dim, (1,)).item()
        return x, y

train_dataset = SimpleDataset(num_samples=20, input_dim=4, output_dim=3)
valid_dataset = SimpleDataset(num_samples=20, input_dim=4, output_dim=3)
test_dataset = SimpleDataset(num_samples=10, input_dim=4, output_dim=3)

ARGS = {
    'batch_size': 2,
    'valid_size': 0.25,
    'train_dataset': train_dataset,
    'valid_dataset': valid_dataset,
    'test_dataset': test_dataset
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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
build_model Ran
ran; our contract draft was wrong, not the code
anastasios-stamoulis/deep-learning-with-csharp-and-cntk/Python/ch3-7.py
code served (permissive licence) · get_code("ae560fa01740cfe8")
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 Sequential. The image it ran in was not recorded. If your copy returns the same type 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 keras
import keras.models
import keras.layers

# The function takes only one parameter: input_dim
# Looking at the function body, input_dim is used as an integer
# to specify the input shape for the first Dense layer

ARGS = {
    'input_dim': 5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
keras — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
build_stack Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ameliajimenez/capsule-networks-medical-data-challenges/stain_normalization/stain_utils.py
code served (permissive licence) · get_code("f47fb66b0f1495bb")
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 ndarray, ndim 4, dtype family float, shape (3, 4, 5, 3) 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 numpy as np

# Create a tuple of sample images with 3 channels (color images)
image1 = np.random.rand(4, 5, 3).astype(np.float32)
image2 = np.random.rand(4, 5, 3).astype(np.float32)
image3 = np.random.rand(4, 5, 3).astype(np.float32)

tup = (image1, image2, image3)

ARGS = {
    "tup": tup
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 4, dtype family float, shape (3, 4, 5, 3) — shape (3, 4, 5, 3) 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
caps_dim_perturb Ran
ran; our contract draft was wrong, not the code
jwwandy/DynamicRoutingBetweenCapsules-PyTorch/caps_perturb.py
pointer only (licence: NONE) · get_code("c0f267f39366e309")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, jwwandy/DynamicRoutingBetweenCapsules-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.

caps_loss Ran
ran; our contract draft was wrong, not the code
DanielLongo/CapsNet-PyTorch/CapsNet.py
pointer only (licence: NONE) · get_code("6d94bff65a753b0d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DanielLongo/CapsNet-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.

capsule_loss_fn Ran
ran; our contract draft was wrong, not the code
ecstayalive/Degenerate-capsule-neural-network/capsule_net/loss.py
code served (permissive licence) · get_code("958171517f243d79")
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 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 sample tensors for the capsule loss function
batch_size = 2
num_classes = 4

# y_pred: predicted labels by CapsNet, size=[batch, classes]
# Should contain values between 0 and 1 (probabilities/activations)
y_pred = torch.rand(batch_size, num_classes)

# y_true: true labels, one hot encoded, size=[batch, classes]
y_true = torch.zeros(batch_size, num_classes)
y_true[0, 0] = 1.0  # First sample belongs to class 0
y_true[1, 2] = 1.0  # Second sample belongs to class 2

# coefficient parameter for the loss function
coefficient = 0.5

ARGS = {
    "y_pred": y_pred,
    "y_true": y_true,
    "coefficient": coefficient,
}
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 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
char2tanh Ran
ran on a synthesized input
JeremyCCHsu/CapsNet-tf/helper.py
code served (permissive licence) · get_code("e681684c378bcb1e")
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 1, dtype family float, shape (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
import numpy as np

torch.manual_seed(0)

# The function char2tanh takes a single parameter x and transforms it from [0, 255] to [-1., 1.]
# x should be a numeric value or array-like that supports division and subtraction

x = torch.tensor([0.0, 127.5, 255.0, 128.0])

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 1, dtype family float, shape (4,) — shape (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
combine_images Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
XifengGuo/CapsNet-Keras/utils.py
code served (permissive licence) · get_code("a4f9b362c3fb2a02")
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 ndarray, ndim 2, dtype family float, shape (8, 6) 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 numpy as np
import math

# Create a small batch of generated images
# Shape: (num_images, height, width, channels)
# Using 4 images with 4x3 spatial dimensions and 3 channels
generated_images = np.random.rand(4, 4, 3, 3).astype(np.float32)

ARGS = {
    "generated_images": generated_images,
    "height": None,
    "width": None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (8, 6) — shape (8, 6) 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
combine_images Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mshaikh2/GANs_Comparison/capsule/utils.py
code served (permissive licence) · get_code("889c715d11d8841d")
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 ndarray, ndim 2, dtype family int, shape (10, 12) 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 numpy as np
import math

# Create sample generated images with shape (batch, height, width, channels)
# Using small dimensions: batch=4, height=5, width=6, channels=3
generated_images = np.random.randint(0, 256, size=(4, 5, 6, 3), dtype=np.uint8)

ARGS = {
    "generated_images": generated_images
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family int, shape (10, 12) — shape (10, 12) 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
convert_list_to_array Ran
ran, honoured the contract we drafted
ameliajimenez/capsule-networks-medical-data-challenges/preprocess_tupac16.py
code served (permissive licence) · get_code("ba9a20e6fac96f58")
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 ndarray, ndim 2, dtype family float, shape (5, 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 numpy as np

# The function expects my_list to be a list of numpy arrays
# Each element in my_list is a numpy array with shape (n_in_patches, ...)
# The function iterates through each array and appends individual patches

# Create a small test case:
# my_list will be a list of 2 arrays (n_out_patches = 2)
# Each array will have shape (3, 4) meaning 3 input patches of dimension 4
patch1 = np.array([[1, 2, 3, 4],
                   [5, 6, 7, 8],
                   [9, 10, 11, 12]], dtype=np.float32)

patch2 = np.array([[13, 14, 15, 16],
                   [17, 18, 19, 20]], dtype=np.float32)

my_list = [patch1, patch2]

ARGS = {
    "my_list": my_list
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (5, 4) — shape (5, 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
cos_dist_output_shape Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
grassknoted/CDAE4InfoExtraction/capsnet-keras/capsulenet.py
code served (permissive licence) · get_code("9169bb6c16583f82")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned tuple, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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
import numpy as np

torch.manual_seed(0)

# The function expects 'shapes' which is a tuple/list of two shapes
# Each shape should be a tuple representing tensor dimensions
# shape1[0] is the batch size, which will be returned as the first dimension
# The function returns (shape1[0], 1)

shape1 = (2, 4)  # batch size 2, feature dimension 4
shape2 = (2, 4)  # batch size 2, feature dimension 4

shapes = (shape1, shape2)

ARGS = {
    'shapes': shapes
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family int — a tuple output has no array shape of its own; none is stated
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
create_path Ran
ran; our contract draft was wrong, not the code
Ian-Liao/SegCaps/cococrawler/getcoco17.py
code served (permissive licence) · get_code("b72eda3284443993")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 tempfile
import os

# Create a temporary directory for testing
temp_dir = tempfile.mkdtemp()

ARGS = {
    'data_dir': temp_dir
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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
cross_entropy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
razvanalex/CapsLayer/capslayer/ops/losses/losses.py
code served (permissive licence) · get_code("aeb7fd30067180af")
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 SymbolicTensor. The image it ran in was not recorded. If your copy returns the same type 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 tensorflow as tf
import numpy as np

# Set random seed for reproducibility
tf.random.set_seed(0)

# Create small sample data
batch_size = 2
num_classes = 4

# labels: sparse integer labels (class indices)
# Must be integers in range [0, num_classes)
labels = tf.constant([0, 2], dtype=tf.int64)

# logits: raw model outputs before softmax
# Shape: (batch_size, num_classes)
logits = tf.constant([
    [1.0, 2.0, 3.0, 4.0],
    [2.0, 1.0, 4.0, 3.0]
], dtype=tf.float32)

# regularizer: optional regularization term
# The function calls tf.reduce_mean(regularizer), so it should be a tensor
regularizer = tf.constant([0.01, 0.02], dtype=tf.float32)

ARGS = {
    "labels": labels,
    "logits": logits,
    "regularizer": regularizer,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SymbolicTensor — a SymbolicTensor output has no array shape of its own; none is stated
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
data_load Ran
ran on a synthesized input
Reatris/Capsule_Net/Capsule_net_paddle_by_Reatris.py
code served (permissive licence) · get_code("1e8dccecc001d2fd")
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 function. The image it ran in was not recorded. If your copy returns the same type 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 numpy as np
import tempfile
import os

# Create a temporary directory and a fake training list file
temp_dir = tempfile.mkdtemp()
train_list_path = os.path.join(temp_dir, 'train_list.txt')

# Create a minimal fake image file and training list
fake_img_dir = os.path.join(temp_dir, 'images')
os.makedirs(fake_img_dir, exist_ok=True)

# Create 2 fake images and a training list file
for i in range(2):
    img_path = os.path.join(fake_img_dir, f'img_{i}.jpg')
    # Create a minimal valid JPEG using numpy and cv2
    import cv2
    fake_img = np.random.randint(0, 255, (100, 100, 3), dtype=np.uint8)
    cv2.imwrite(img_path, fake_img)

# Write training list with image paths and labels
with open(train_list_path, 'w') as f:
    for i in range(2):
        img_path = os.path.join(fake_img_dir, f'img_{i}.jpg')
        label = i % 12  # Labels 0-11
        f.write(f'{img_path} {label}\n')

ARGS = {
    'train_list_path': train_list_path,
    'batch_size': 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
dc Ran
ran, honoured the contract we drafted
lalonderodney/SegCaps/metrics.py
code served (permissive licence) · get_code("9e374d498da47a80")
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 float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 numpy as np

# Construct valid arguments for the dc function
# The function takes two array-like inputs and computes Dice coefficient

# Create simple binary arrays for result and reference
result = np.array([1, 0, 1, 1, 0, 1], dtype=np.uint8)
reference = np.array([1, 1, 0, 1, 0, 1], dtype=np.uint8)

ARGS = {
    "result": result,
    "reference": reference,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
default_batch_norm_params Ran
ran on a synthesized input
Sarasra/models/research/domain_adaptation/domain_separation/models.py
pointer only (licence: Apache-2.0) · get_code("9752e0af7e2e920e")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, Sarasra/models, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

denormalize Ran
ran on a synthesized input
ethanleet/CapsNet/tools.py
code served (permissive licence) · get_code("5c5b8a89cd91d2f6")
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 to use as the image
# The function uses: image.min(), image.max(), and arithmetic operations
# So we need a tensor with numeric values
image = torch.randn(2, 4)

ARGS = {
    "image": image
}
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
dense_to_one_hot Ran
ran; our contract draft was wrong, not the code
ameliajimenez/capsule-networks-medical-data-challenges/data_loader.py
pointer only (licence: MIT); the stored copy get_code serves, from campanulabells/prem-gad, is pointer only (licence: NONE) · get_code("e161978d5621fd5a")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from campanulabells/prem-gad, and GitHub detected no licence in that repository 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.

dice_hard Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
lalonderodney/SegCaps/custom_losses.py
code served (permissive licence) · get_code("4d42218ea782618b")
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 EagerTensor, 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 tensorflow as tf
import numpy as np

# Create small test tensors with batch_size=2, spatial dims 4x3x2
batch_size = 2
y_pred = tf.constant(np.random.rand(batch_size, 4, 3, 2), dtype=tf.float32)
y_true = tf.constant(np.random.rand(batch_size, 4, 3, 2), dtype=tf.float32)

ARGS = {
    "y_true": y_true,
    "y_pred": y_pred,
    "threshold": 0.5,
    "axis": [1, 2, 3],
    "smooth": 1e-05,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, 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
elastic_transform Ran
ran; our contract draft was wrong, not the code
lalonderodney/SegCaps/custom_data_aug.py
code served (permissive licence) · get_code("354cb4ef853ea7c0")
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 ndarray, ndim 3, dtype family float, shape (32, 40, 3) 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 numpy as np
import cv2
from scipy.ndimage.interpolation import map_coordinates

# Create a small test image with 3 channels (RGB-like)
# Shape: (height=32, width=40, channels=3)
test_image = np.random.randint(0, 256, size=(32, 40, 3), dtype=np.uint8).astype(np.float32)

# Create a random state for reproducibility
random_state_obj = np.random.RandomState(42)

ARGS = {
    "image": test_image,
    "alpha": 2000,
    "sigma": 40,
    "alpha_affine": 40,
    "random_state": random_state_obj
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family float, shape (32, 40, 3) — shape (32, 40, 3) 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
extract_images Ran
ran on a synthesized input
Colonel-Hathi/CapsNet-Treemap-Perception-Trafficsign/data_handler.py
code served (permissive licence) · get_code("0fa7ba2d6f1b5e7d")
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 ndarray, ndim 4, dtype family int, shape (2, 48, 48, 3) 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 glob
import numpy as np
import tempfile
import os
from PIL import Image

# Create a temporary directory with test PNG images
temp_dir = tempfile.mkdtemp()

# Create a few small test PNG images
for i in range(2):
    img = Image.new('RGB', (64, 64), color=(i*50, i*100, i*150))
    img.save(os.path.join(temp_dir, f'test_{i}.png'))

ARGS = {
    'folder': temp_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 4, dtype family int, shape (2, 48, 48, 3) — shape (2, 48, 48, 3) 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
extract_labels Ran
ran, honoured the contract we drafted
ameliajimenez/capsule-networks-medical-data-challenges/data_loader.py
code served (permissive licence) · get_code("a4fd5ddd12015349")
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 ndarray, ndim 1, dtype family int, shape (5,) 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 numpy as np
import gzip
import io

# Create a minimal valid MNIST label file in gzip format
def create_mock_mnist_label_file():
    """Create a mock gzipped MNIST label file."""
    buffer = io.BytesIO()
    
    # Write magic number (2049 in big-endian uint32)
    magic = np.uint32(2049).tobytes()
    # Convert to big-endian
    magic = np.array([2049], dtype=np.dtype(np.uint32).newbyteorder('>')).tobytes()
    
    # Write number of items (5 labels in big-endian uint32)
    num_items = np.array([5], dtype=np.dtype(np.uint32).newbyteorder('>')).tobytes()
    
    # Write label data (5 uint8 values)
    labels_data = np.array([0, 1, 2, 3, 4], dtype=np.uint8).tobytes()
    
    # Combine all data
    data = magic + num_items + labels_data
    
    # Gzip compress it
    with gzip.GzipFile(fileobj=buffer, mode='wb') as gz:
        gz.write(data)
    
    buffer.seek(0)
    return buffer

# Create the mock file object
mock_file = create_mock_mnist_label_file()
mock_file.name = "test_labels.gz"

ARGS = {
    'f': mock_file,
    'one_hot': False,
    'num_classes': 10
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family int, shape (5,) — shape (5,) 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
extract_patches Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ameliajimenez/capsule-networks-medical-data-challenges/preprocess_diaretdb1.py
code served (permissive licence) · get_code("cd1f1b152fc81869")
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 ndarray, ndim 3, dtype family int, shape (30, 28, 28) 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 cv2
import numpy as np

# Create a small grayscale image (200x200)
img = np.random.randint(0, 256, size=(200, 200), dtype=np.uint8)

# Create centers array - 3 centers with (x, y) coordinates
# Centers should be roughly in the middle of the image to avoid boundary issues
centers = np.array([
    [100, 100],
    [80, 120],
    [120, 80]
], dtype=np.int32)

ARGS = {
    'img': img,
    'centers': centers,
    'patch_size': 50,
    'n_patches': 30,
    'augment': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family int, shape (30, 28, 28) — shape (30, 28, 28) 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
extract_patches Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ameliajimenez/capsule-networks-medical-data-challenges/preprocess_tupac16.py
code served (permissive licence) · get_code("9609ff43029770e8")
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 ndarray, ndim 4, dtype family int, shape (32, 28, 28, 3) 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 numpy as np
import cv2

# Create a small test image (height=400, width=400, channels=3)
# The function expects an image with at least 2 dimensions and uses indexing like img[x:x+size, y:y+size, ...]
test_img = np.random.randint(0, 256, (400, 400, 3), dtype=np.uint8)

# Create centers array with shape (n_mitoses, 2) where each row is [cx, cy]
# Using coordinates well within the image bounds to avoid edge cases
centers = np.array([
    [150, 150],
    [250, 250]
], dtype=np.int32)

ARGS = {
    'img': test_img,
    'centers': centers,
    'augment': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 4, dtype family int, shape (32, 28, 28, 3) — shape (32, 28, 28, 3) 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
find_grid Ran
ran, honoured the contract we drafted
ameliajimenez/capsule-networks-medical-data-challenges/preprocess_tupac16.py
code served (permissive licence) · get_code("2ecfcd586e6b8acf")
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 ndarray, ndim 2, dtype family int, shape (3, 2) 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 numpy as np

# Read the function to understand what it expects:
# - centers: a numpy array with shape (n, 2) where n is the number of centers
#   The function accesses centers[m, 0] for row and centers[m, 1] for column

# Create a small valid input
# We'll create 2 centers with coordinates near the grid points
centers = np.array([
    [250, 750],   # Close to first grid point
    [1250, 1250]  # Close to another grid point
], dtype=np.float64)

ARGS = {
    'centers': centers
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family int, shape (3, 2) — shape (3, 2) 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
flip_axis Ran
ran; our contract draft was wrong, not the code
Cheng-Lin-Li/SegCaps/utils/custom_data_aug.py
code served (permissive licence) · get_code("fa45f6e21e1f5d6e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned ndarray, ndim 3, dtype family int, shape (2, 3, 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 numpy as np

# Create a small 3D array to test axis flipping
x = np.array([
    [[1, 2, 3, 4],
     [5, 6, 7, 8],
     [9, 10, 11, 12]],
    
    [[13, 14, 15, 16],
     [17, 18, 19, 20],
     [21, 22, 23, 24]]
])

# Choose an axis to flip (0, 1, or 2 are valid for this 3D array)
axis = 1

ARGS = {
    'x': x,
    'axis': axis
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family int, shape (2, 3, 4) — shape (2, 3, 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
get_coord_add Ran
ran, honoured the contract we drafted
www0wwwjs1/Matrix-Capsules-EM-Tensorflow/config.py
code served (permissive licence) · get_code("d805a7b2c2d7d3ad")
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 ndarray, ndim 3, dtype family float, shape (3, 3, 2) 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 numpy as np

def get_coord_add(dataset_name: str):
    import numpy as np
    options = {'mnist': ([[[8.0, 8.0], [12.0, 8.0], [16.0, 8.0]], [[8.0, 12.0], [12.0, 12.0], [16.0, 12.0]], [[8.0, 16.0], [12.0, 16.0], [16.0, 16.0]]], 28.0), 'smallNORB': ([[[8.0, 8.0], [12.0, 8.0], [16.0, 8.0], [24.0, 8.0]], [[8.0, 12.0], [12.0, 12.0], [16.0, 12.0], [24.0, 12.0]], [[8.0, 16.0], [12.0, 16.0], [16.0, 16.0], [24.0, 16.0]], [[8.0, 24.0], [12.0, 24.0], [16.0, 24.0], [24.0, 24.0]]], 32.0)}
    coord_add, scale = options[dataset_name]
    coord_add = np.array(coord_add, dtype=np.float32) / scale
    return coord_add

ARGS = {
    'dataset_name': 'mnist'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family float, shape (3, 3, 2) — shape (3, 3, 2) 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
get_data Ran
ran on a synthesized input
Oushesh/CapsClassifigner/data_handler.py
code served (permissive licence) · get_code("78eab6842a55500d")
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 tuple. The image it ran in was not recorded. If your copy returns the same type 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 os
import pickle
import tempfile
import numpy as np

# Create a temporary directory for test data
temp_dir = tempfile.mkdtemp()

# Create mock pickle files with the expected structure
train_data = {
    'features': np.random.rand(10, 32, 32, 3),
    'labels': np.random.randint(0, 43, 10)
}

valid_data = {
    'features': np.random.rand(5, 32, 32, 3),
    'labels': np.random.randint(0, 43, 5)
}

test_data = {
    'features': np.random.rand(3, 32, 32, 3),
    'labels': np.random.randint(0, 43, 3)
}

# Write pickle files
with open(os.path.join(temp_dir, 'train.p'), 'wb') as f:
    pickle.dump(train_data, f)

with open(os.path.join(temp_dir, 'valid.p'), 'wb') as f:
    pickle.dump(valid_data, f)

with open(os.path.join(temp_dir, 'test.p'), 'wb') as f:
    pickle.dump(test_data, f)

ARGS = {
    'folder': temp_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
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
get_dataset_size_test Ran
ran, honoured the contract we drafted
www0wwwjs1/Matrix-Capsules-EM-Tensorflow/config.py
code served (permissive licence) · get_code("18f1ac5a3bb1245f")
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 int, ndim 0, dtype family int, 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)

ARGS = {
    'dataset_name': 'mnist'
}
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 int, ndim 0, dtype family int, 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
get_dataset_size_train Ran
ran, honoured the contract we drafted
www0wwwjs1/Matrix-Capsules-EM-Tensorflow/config.py
code served (permissive licence) · get_code("4293fbb258948def")
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 int, ndim 0, dtype family int, 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
import numpy as np

torch.manual_seed(0)

ARGS = {
    'dataset_name': 'mnist'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, 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
get_mean_std Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ameliajimenez/capsule-networks-medical-data-challenges/stain_normalization/stainNorm_Reinhard.py
code served (permissive licence) · get_code("3619549fb958505d")
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 tuple, ndim 4, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 cv2 as cv
import numpy as np

# Create a small RGB image as uint8
# Shape: (height=4, width=3, channels=3) for RGB
I = np.random.randint(0, 256, size=(4, 3, 3), dtype=np.uint8)

ARGS = {
    "I": I
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 4, dtype family float — a tuple output has no array shape of its own; none is stated
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
get_path Ran
ran on a synthesized input
ethanleet/CapsNet/tools.py
code served (permissive licence) · get_code("5c2f7dad1037f39e")
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 str. The image it ran in was not recorded. If your copy returns the same type 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 os
import tempfile

# Create a temporary directory for testing
SAVE_DIR = tempfile.mkdtemp()
filename = "test_file.txt"

ARGS = {
    "SAVE_DIR": SAVE_DIR,
    "filename": filename,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
get_samples Ran
ran; our contract draft was wrong, not the code
soskek/dynamic_routing_between_capsules/visualize.py
code served (permissive licence) · get_code("19f6c412420d3c16")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned list. The image it ran in was not recorded. If your copy returns the same type 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
import numpy as np

torch.manual_seed(0)

class StandInDataset:
    def __init__(self):
        # Create samples where target t cycles through 0-9
        # We need at least 20 samples where t == len(samples) // 2
        # This means we need samples where:
        # - when len(samples) == 0, t == 0 (first sample with t=0)
        # - when len(samples) == 2, t == 1 (third sample with t=1)
        # - when len(samples) == 4, t == 2 (fifth sample with t=2)
        # etc.
        # So we need to provide enough samples with the right targets
        self.data = []
        
        # Generate samples with cycling targets
        # We need 20 samples total, so we need targets 0,1,2,...,9 twice each
        for i in range(100):
            x = torch.randn(3, 4)  # 3x4 tensor
            t = i % 10  # cycle through 0-9
            self.data.append((x, t))
    
    def __iter__(self):
        return iter(self.data)
    
    def __getitem__(self, idx):
        return self.data[idx]
    
    def __len__(self):
        return len(self.data)

dataset = StandInDataset()

ARGS = {
    'dataset': dataset
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list output has no array shape of its own; none is stated
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
jc Ran
ran, honoured the contract we drafted
lalonderodney/SegCaps/metrics.py
code served (permissive licence) · get_code("bebfab67566d4deb")
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 numpy as np

# Create simple binary arrays for testing the Jaccard coefficient
# result: a binary array with some objects
result = np.array([
    [0, 1, 1, 0],
    [1, 1, 0, 0],
    [1, 0, 0, 1],
    [0, 0, 1, 1]
], dtype=np.uint8)

# reference: another binary array with overlapping objects
reference = np.array([
    [0, 1, 0, 0],
    [1, 1, 1, 0],
    [0, 0, 0, 1],
    [0, 0, 1, 0]
], dtype=np.uint8)

ARGS = {
    "result": result,
    "reference": reference
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
kernel_tile Ran
ran; our contract draft was wrong, not the code
www0wwwjs1/Matrix-Capsules-EM-Tensorflow/capsnet_em.py
code served (permissive licence) · get_code("c23def11ceb6917f")
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 SymbolicTensor. The image it ran in was not recorded. If your copy returns the same type 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 tensorflow as tf
import numpy as np

# Create a small input tensor
# Shape: [batch, height, width, channels]
# batch=2, height=5, width=5, channels=3
input_tensor = tf.constant(
    np.random.randn(2, 5, 5, 3).astype(np.float32),
    dtype=tf.float32
)

# Kernel size
kernel = 3

# Stride
stride = 1

ARGS = {
    "input": input_tensor,
    "kernel": kernel,
    "stride": stride
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SymbolicTensor — a SymbolicTensor output has no array shape of its own; none is stated
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
lab_split Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ameliajimenez/capsule-networks-medical-data-challenges/stain_normalization/stainNorm_Reinhard.py
code served (permissive licence) · get_code("c2c66bc5a1670838")
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 tuple, ndim 3, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 cv2 as cv
import numpy as np

# Create a small RGB image as uint8
# Use shape (4, 3, 3) to represent a 4x3 image with 3 RGB channels
I = np.random.randint(0, 256, size=(4, 3, 3), dtype=np.uint8)

ARGS = {
    "I": I
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 3, dtype family float — a tuple output has no array shape of its own; none is stated
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
load_from_file Ran
ran on a synthesized input
JunYeopLee/capsule-networks/capsNet/utils.py
code served (permissive licence) · get_code("454894a6d26864c2")
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 ndarray, ndim 1, dtype family int, shape (133,) 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 numpy as np
import tempfile
import os

# Create a temporary file with some numpy data
temp_dir = tempfile.mkdtemp()
temp_file_path = os.path.join(temp_dir, "test_data.npy")

# Create and save a small numpy array
test_array = np.array([1, 2, 3, 4, 5], dtype=np.uint8)
np.save(temp_file_path, test_array)

# Prepare arguments for the function
ARGS = {
    "path": temp_file_path,
    "mode": "rb"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family int, shape (133,) — shape (133,) 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
load_mnist Ran
ran; our contract draft was wrong, not the code
naturomics/CapsNet-Tensorflow/utils.py
code served (permissive licence) · get_code("a60140719ee8eeab")
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 tuple. The image it ran in was not recorded. If your copy returns the same type 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 os
import numpy as np
import tempfile
import shutil

# Create a temporary directory structure with mock MNIST data files
temp_dir = tempfile.mkdtemp()
data_dir = os.path.join(temp_dir, 'data', 'mnist')
os.makedirs(data_dir, exist_ok=True)

# Create mock train-images file (16 byte header + 60000 * 28 * 28 * 1 bytes)
train_images_data = np.zeros(16 + 60000 * 28 * 28 * 1, dtype=np.uint8)
train_images_data[16:] = np.random.randint(0, 256, 60000 * 28 * 28 * 1, dtype=np.uint8)
with open(os.path.join(data_dir, 'train-images-idx3-ubyte'), 'wb') as f:
    f.write(train_images_data.tobytes())

# Create mock train-labels file (8 byte header + 60000 bytes)
train_labels_data = np.zeros(8 + 60000, dtype=np.uint8)
train_labels_data[8:] = np.random.randint(0, 10, 60000, dtype=np.uint8)
with open(os.path.join(data_dir, 'train-labels-idx1-ubyte'), 'wb') as f:
    f.write(train_labels_data.tobytes())

# Create mock test-images file (16 byte header + 10000 * 28 * 28 * 1 bytes)
test_images_data = np.zeros(16 + 10000 * 28 * 28 * 1, dtype=np.uint8)
test_images_data[16:] = np.random.randint(0, 256, 10000 * 28 * 28 * 1, dtype=np.uint8)
with open(os.path.join(data_dir, 't10k-images-idx3-ubyte'), 'wb') as f:
    f.write(test_images_data.tobytes())

# Create mock test-labels file (8 byte header + 10000 bytes)
test_labels_data = np.zeros(8 + 10000, dtype=np.uint8)
test_labels_data[8:] = np.random.randint(0, 10, 10000, dtype=np.uint8)
with open(os.path.join(data_dir, 't10k-labels-idx1-ubyte'), 'wb') as f:
    f.write(test_labels_data.tobytes())

# Change to temp directory so relative path 'data/mnist' works
original_dir = os.getcwd()
os.chdir(temp_dir)

ARGS = {
    'batch_size': 32,
    'is_training': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
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
load_npy_files Ran
ran; our contract draft was wrong, not the code
anastasios-stamoulis/deep-learning-with-csharp-and-cntk/Python/ch5-3.py
code served (permissive licence) · get_code("f57a3bb8459d9735")
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 tuple. The image it ran in was not recorded. If your copy returns the same type 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 numpy as np
import tempfile
import os

# Create temporary directory and files for testing
tmpdir = tempfile.mkdtemp()
prefix = os.path.join(tmpdir, 'test')

# Create dummy npy files
features = np.random.randn(2, 4).astype(np.float32)
labels = np.array([0, 1], dtype=np.int64)

np.save(prefix + '_features.npy', features)
np.save(prefix + '_labels.npy', labels)

ARGS = {
    'prefix': prefix
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
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
load_texts_labels Ran
ran; our contract draft was wrong, not the code
anastasios-stamoulis/deep-learning-with-csharp-and-cntk/Python/ch6-1_b.py
code served (permissive licence) · get_code("93341244192ac2a3")
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 tuple, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 os
import tempfile
import shutil

# Create a temporary directory structure with sample text files
temp_dir = tempfile.mkdtemp()
neg_dir = os.path.join(temp_dir, 'neg')
pos_dir = os.path.join(temp_dir, 'pos')
os.makedirs(neg_dir)
os.makedirs(pos_dir)

# Create sample negative text files
with open(os.path.join(neg_dir, 'sample1.txt'), 'w', encoding='utf8') as f:
    f.write("This is a negative review. I did not like it.")

with open(os.path.join(neg_dir, 'sample2.txt'), 'w', encoding='utf8') as f:
    f.write("Terrible experience. Would not recommend.")

# Create sample positive text files
with open(os.path.join(pos_dir, 'sample1.txt'), 'w', encoding='utf8') as f:
    f.write("This is a positive review. I loved it!")

with open(os.path.join(pos_dir, 'sample2.txt'), 'w', encoding='utf8') as f:
    f.write("Amazing product. Highly recommended.")

ARGS = {
    'path': temp_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, dtype family float — a tuple output has no array shape of its own; none is stated
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
make_tf_example Ran
ran on a synthesized input
JeremyCCHsu/CapsNet-tf/build_multimnist.py
code served (permissive licence) · get_code("45ba4b2229e7c5d0")
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 Example. The image it ran in was not recorded. If your copy returns the same type 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 tensorflow as tf

# Create a small image string (bytes)
image_string = b'\x89PNG\r\n\x1a\n' + b'\x00' * 32  # Mock PNG header + some bytes

# Create a list of class labels (integers)
classes = [0, 1, 2]

ARGS = {
    'image_string': image_string,
    'classes': classes
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Example — a Example output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Example output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
margin_loss Ran
ran, violated the contract we drafted
naturomics/CapsLayer/capslayer/ops/losses/losses.py
code served (permissive licence) · get_code("8278b9f74e0d99c0")
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 EagerTensor, 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 tensorflow as tf
import numpy as np

# Set seed for reproducibility
tf.random.set_seed(0)
np.random.seed(0)

# Create small test tensors
batch_size = 2
num_label = 4

# labels: [batch_size, num_label] with binary values (0 or 1)
labels = tf.constant([
    [1.0, 0.0, 1.0, 0.0],
    [0.0, 1.0, 0.0, 1.0]
], dtype=tf.float32)

# logits: [batch_size, num_label] with values between 0 and 1
logits = tf.constant([
    [0.8, 0.3, 0.7, 0.2],
    [0.4, 0.95, 0.1, 0.6]
], dtype=tf.float32)

ARGS = {
    "labels": labels,
    "logits": logits,
    "upper_margin": 0.9,
    "bottom_margin": 0.1,
    "downweight": 0.5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, 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
matmul Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
naturomics/CapsLayer/capslayer/ops/math_ops.py
code served (permissive licence) · get_code("71f308af9ead46b8")
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 SymbolicTensor. The image it ran in was not recorded. If your copy returns the same type 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 tensorflow as tf
import numpy as np

# Create small test tensors for matrix multiplication
# Using distinct sizes: 2x3 and 3x4 to make dimensions unambiguous

a = tf.constant(np.random.randn(2, 3), dtype=tf.float32)
b = tf.constant(np.random.randn(3, 4), dtype=tf.float32)

ARGS = {
    'a': a,
    'b': b,
    'transpose_a': False,
    'transpose_b': False,
    'name': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SymbolicTensor — a SymbolicTensor output has no array shape of its own; none is stated
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
merge_back Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ameliajimenez/capsule-networks-medical-data-challenges/stain_normalization/stainNorm_Reinhard.py
code served (permissive licence) · get_code("7e43778f815ea3c2")
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 ndarray, ndim 3, dtype family int, shape (2, 4, 3) 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 cv2 as cv
import numpy as np
import torch

# Create sample LAB channel arrays
# L channel (0-100) scaled to 0-255 range for this function
I1 = np.array([[50.0, 60.0, 70.0, 80.0],
               [40.0, 55.0, 65.0, 75.0]], dtype=np.float32)

# A channel (centered around 0, range roughly -127 to 127)
I2 = np.array([[10.0, -15.0, 20.0, -5.0],
               [5.0, -10.0, 15.0, -20.0]], dtype=np.float32)

# B channel (centered around 0, range roughly -127 to 127)
I3 = np.array([[-5.0, 10.0, -15.0, 20.0],
               [-10.0, 5.0, -20.0, 15.0]], dtype=np.float32)

ARGS = {
    'I1': I1,
    'I2': I2,
    'I3': I3,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family int, shape (2, 4, 3) — shape (2, 4, 3) 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
nchw_to_nhwc Ran
ran on a synthesized input
JeremyCCHsu/CapsNet-tf/helper.py
code served (permissive licence) · get_code("d47f898b34da72b5")
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 SymbolicTensor. The image it ran in was not recorded. If your copy returns the same type 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 tensorflow as tf
import numpy as np

# Create a small NCHW format tensor (batch=2, channels=4, height=3, width=5)
x = tf.constant(np.random.randn(2, 4, 3, 5), dtype=tf.float32)

ARGS = {
    'x': x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SymbolicTensor — a SymbolicTensor output has no array shape of its own; none is stated
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
nhwc_to_nchw Ran
ran on a synthesized input
JeremyCCHsu/CapsNet-tf/helper.py
code served (permissive licence) · get_code("ad88fd8ea70fc685")
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 EagerTensor, ndim 4, dtype family float, shape (2, 5, 3, 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 tensorflow as tf
import numpy as np

# Create a small NHWC tensor (batch=2, height=3, width=4, channels=5)
x = tf.constant(np.random.randn(2, 3, 4, 5).astype(np.float32))

ARGS = {
    'x': x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 4, dtype family float, shape (2, 5, 3, 4) — shape (2, 5, 3, 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
normalize_cap Ran
ran; our contract draft was wrong, not the code
hli2020/nn_encapsulation/layers/cap_layer.py
pointer only (licence: NONE) · get_code("c4647dd5ef46a3fd")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, hli2020/nn_encapsulation 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.

pad_to44 Ran
ran on a synthesized input
JeremyCCHsu/CapsNet-tf/build_multimnist.py
code served (permissive licence) · get_code("59858e235d46459f")
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 ndarray, ndim 3, dtype family float, shape (44, 44, 1) 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 numpy as np

# The function pad_to44 takes:
# - img: an image array that gets placed in the center of a 44x44x1 array
# - shape: the target shape (default [44, 44, 1])

# Looking at the function body:
# - result is initialized as np.zeros([44, 44, 1])
# - img is assigned to result[8:36, 8:36, :], so img must be shape [28, 28, 1]
#   (since 36-8=28)

# Create a small test image with shape [28, 28, 1]
test_img = np.random.rand(28, 28, 1).astype(np.float32)

ARGS = {
    "img": test_img,
    "shape": [44, 44, 1]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family float, shape (44, 44, 1) — shape (44, 44, 1) 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
precision Ran
ran, honoured the contract we drafted
lalonderodney/SegCaps/metrics.py
code served (permissive licence) · get_code("7f6b9d28c90431fb")
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 float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 numpy as np

# Create two binary arrays for testing precision
# result: predicted binary mask
# reference: ground truth binary mask

result = np.array([1, 1, 1, 0, 0, 1, 0, 0], dtype=np.uint8)
reference = np.array([1, 1, 0, 0, 1, 1, 0, 0], dtype=np.uint8)

ARGS = {
    "result": result,
    "reference": reference
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
preprocess_img Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ameliajimenez/capsule-networks-medical-data-challenges/preprocess_diaretdb1.py
code served (permissive licence) · get_code("7b42b0ac5492beb9")
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 tuple, ndim 3, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 cv2
import numpy as np
from PIL import Image

# Create a small BGR image (simulating typical image input)
# Using shape (4, 3, 3) - height=4, width=3, channels=3 (BGR)
img = np.random.randint(0, 256, size=(4, 3, 3), dtype=np.uint8)

# Create a foreground mask (same spatial dimensions as img)
fmask = np.random.randint(0, 2, size=(4, 3), dtype=np.uint8)

# Create all_masks (same spatial dimensions as img)
all_masks = np.random.randint(0, 2, size=(4, 3), dtype=np.uint8)

# clipLimit parameter for CLAHE
clipLimit = 3.0

ARGS = {
    "img": img,
    "fmask": fmask,
    "all_masks": all_masks,
    "clipLimit": clipLimit,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 3, dtype family float — a tuple output has no array shape of its own; none is stated
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
preprocess_input Ran
ran; our contract draft was wrong, not the code
lalonderodney/SegCaps/densenets.py
code served (permissive licence) · get_code("df095bccc89495e4")
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 ndarray, ndim 4, dtype family float, shape (2, 4, 4, 3) 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 numpy as np

# Create a small 4D input tensor (batch_size=2, height=4, width=4, channels=3)
# This is a batch of 2 images with height 4, width 4, and 3 color channels
x = np.random.rand(2, 4, 4, 3).astype(np.float32) * 255

# data_format can be None, 'channels_last', or 'channels_first'
# Using None lets Keras use the default
data_format = None

ARGS = {
    "x": x,
    "data_format": data_format,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
keras, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 4, dtype family float, shape (2, 4, 4, 3) — shape (2, 4, 4, 3) 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
random_crop Ran
ran on a synthesized input
JeremyCCHsu/CapsNet-tf/build_multimnist.py
code served (permissive licence) · get_code("0da33f8508f5c3ef")
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 ndarray, ndim 3, dtype family int, shape (36, 36, 3) 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 numpy as np

# Create a small image array
# The function expects img[i:i+shape, j:j+shape, :]
# So we need at least (36+8, 36+8, channels) to allow for valid cropping
# since i,j are chosen from range(9), max indices are 8
# img[8:8+36, 8:8+36, :] requires shape (44, 44, channels) minimum
img = np.random.randint(0, 256, size=(44, 44, 3), dtype=np.uint8)

ARGS = {
    "img": img,
    "shape": 36
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family int, shape (36, 36, 3) — shape (36, 36, 3) 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
read_image Ran
ran, honoured the contract we drafted
ameliajimenez/capsule-networks-medical-data-challenges/stain_normalization/stain_utils.py
code served (permissive licence) · get_code("c95802bf73f69647")
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 ndarray, ndim 3, dtype family int, shape (100, 100, 3) 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 cv2 as cv
import tempfile
import numpy as np
import os

# Create a temporary directory and a test image file
temp_dir = tempfile.mkdtemp()
test_image_path = os.path.join(temp_dir, "test_image.png")

# Create a simple RGB image (100x100 pixels, 3 channels)
test_image = np.random.randint(0, 256, (100, 100, 3), dtype=np.uint8)

# Save as BGR (OpenCV format) since cv.imread reads in BGR
test_image_bgr = cv.cvtColor(test_image, cv.COLOR_RGB2BGR)
cv.imwrite(test_image_path, test_image_bgr)

ARGS = {
    "path": test_image_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family int, shape (100, 100, 3) — shape (100, 100, 3) 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

Showing the first 60. An agent gets every one from get_harvested_code_for_paper("1710.09829").

Also present in other papers' code

Of 118 samples lifted from this paper's linked repositories, 118 carry a function identity and 0 do not. Of the 118 distinct functions with an identity, 13 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 12 later) and 105 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
average_gradients 3 other papers
1 dated earlier, 2 later
1511.06422 (2015-11)
All you need is a good init
1808.00157 (2018-08)
Instance-level Human Parsing via Part Grouping Network
1809.01465 (2018-09)
Deep Bilevel Learning
squash 2 other papers
1 dated earlier, 1 later
1406.2661 (2014-06)
Generative Adversarial Networks
1904.08900 (2019-04)
CornerNet-Lite: Efficient Keypoint Based Object Detection
squash 2 other papers
2 later
1807.10108 (2018-07)
Effects of Degradations on Deep Neural Network Architectures
2112.03939 (2021-12)
Photometric Redshifts from SDSS Images with an Interpretable Deep Capsule Network
squash 2 other papers
2 later
1904.09546 (2019-04)
DeepCaps: Going Deeper with Capsule Networks
2112.03939 (2021-12)
Photometric Redshifts from SDSS Images with an Interpretable Deep Capsule Network
PrimaryCap 1 other paper
1 later
2112.03939 (2021-12)
Photometric Redshifts from SDSS Images with an Interpretable Deep Capsule Network
caps_loss 1 other paper
1 later
1904.08900 (2019-04)
CornerNet-Lite: Efficient Keypoint Based Object Detection
dense_to_one_hot 1 other paper
1 later
2310.11676 (2023-10)
PREM: A Simple Yet Effective Approach for Node-Level Graph Anomaly Detection
margin_loss 1 other paper
1 later
1904.09546 (2019-04)
DeepCaps: Going Deeper with Capsule Networks
normalize_cap 1 other paper
1 later
1808.03749 (2018-08)
Neural Network Encapsulation
preprocess_input 1 other paper
1 dated earlier
1512.04150 (2015-12)
Learning Deep Features for Discriminative Localization
squash 1 other paper
1 later
2010.10392 (2020-10)
CharacterBERT: Reconciling ELMo and BERT for Word-Level Open-Vocabulary Representations From Characters
squash 1 other paper
1 later
1808.03749 (2018-08)
Neural Network Encapsulation
squash 1 other paper
1 later
2311.04245 (2023-11)
GPT-ST: Generative Pre-Training of Spatio-Temporal Graph Neural Networks

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

Repositories linked to this paper

More are linked than shown here.

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

Abstract

A capsule is a group of neurons whose activity vector represents the instantiation parameters of a specific type of entity such as an object or an object part. We use the length of the activity vector to represent the probability that the entity exists and its orientation to represent the instantiation parameters. Active capsules at one level make predictions, via transformation matrices, for the instantiation parameters of higher-level capsules. When multiple predictions agree, a higher level capsule becomes active. We show that a discrimininatively trained, multi-layer capsule system achieves state-of-the-art performance on MNIST and is considerably better than a convolutional net at recognizing highly overlapping digits. To achieve these results we use an iterative routing-by-agreement mechanism: A lower-level capsule prefers to send its output to higher level capsules whose activity vectors have a big scalar product with the prediction coming from the lower-level capsule.

For agents

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

get_harvested_code_for_paper("1710.09829")
get_code_for_paper("1710.09829")
have("1710.09829")

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

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

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

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

Connect an agent — have() is free.