SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1506.02025 · 2015

Spatial Transformer Networks

arXiv · PDF · Open in the Atlas

Code that ran

21 of 31 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; 4 honoured the contract we drafted, 1 violated it and 14 have no contract verdict; 2 failures of our instrument; 10 no recorded run), measured 2026-11-24; 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/1506.02025.json · badge: /api/ran/1506.02025.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
dabane-ghassan/int-lab-book community (classifier label)
classifier basis not recorded on the link
8 ran · 3 no recorded run
chenwuperth/rgz_rcnn community (classifier label)
classifier basis not recorded on the link
6 ran · 2 no recorded run
kevinzakka/spatial-transformer-network community (classifier label)
classifier basis not recorded on the link
5 ran · 1 no recorded run
mimikaan/Attention-Model community (classifier label)
classifier basis not recorded on the link
1 ran · 1 no recorded run
oarriaga/spatial_transformer_networks community (classifier label)
classifier basis not recorded on the link
1 ran · 1 no recorded run
iwyoo/tf_thinplatespline community (classifier label)
classifier basis not recorded on the link
0 ran · 2 no recorded run
FunctionStatusWhere it lives
affine_grid_generator Ran
ran on a synthesized input
kevinzakka/spatial-transformer-network/stn/transformer.py
code served (permissive licence) · get_code("4da47c257ee7f2d5")
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, 2, 4, 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 tensorflow as tf

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

# Define parameters for affine_grid_generator
height = 4
width = 5

# Create a batch of affine transformation matrices
# Shape: (num_batch, 2, 3)
# Using a small batch size of 2
num_batch = 2
theta = tf.constant([
    [[1.0, 0.0, 0.1],
     [0.0, 1.0, 0.2]],
    [[0.9, 0.1, -0.05],
     [-0.1, 0.9, 0.15]]
], dtype=tf.float32)

ARGS = {
    'height': height,
    'width': width,
    'theta': theta
}
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 EagerTensor, ndim 4, dtype family float, shape (2, 2, 4, 5) — shape (2, 2, 4, 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
array2img Ran
ran on a synthesized input
kevinzakka/spatial-transformer-network/utils.py
code served (permissive licence) · get_code("8d48f06c0172ba12")
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 Image. 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
from PIL import Image

# Create a small test numpy array
# The function expects an array-like object that can be converted to numpy array
# It should be RGB (3 channels) for the Image.fromarray call with mode 'RGB'
# Using shape (3, 4, 3) - height=3, width=4, channels=3
test_array = np.random.randn(3, 4, 3) * 10 - 5

ARGS = {
    'x': test_array
}
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 Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
bbox_transform Ran
ran, violated the contract we drafted
chenwuperth/rgz_rcnn/lib/fast_rcnn/bbox_transform.py
code served (permissive licence) · get_code("e774ae94b0630877")
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 small bounding box arrays for testing
# Format: [x1, y1, x2, y2] for each box
# ex_rois: example/anchor rois - shape (batch_size, 4)
ex_rois = np.array([
    [10.0, 20.0, 50.0, 80.0],
    [5.0, 15.0, 45.0, 75.0]
], dtype=np.float32)

# gt_rois: ground-truth rois - shape (batch_size, 4)
gt_rois = np.array([
    [12.0, 22.0, 52.0, 82.0],
    [6.0, 16.0, 46.0, 76.0]
], dtype=np.float32)

ARGS = {
    'ex_rois': ex_rois,
    'gt_rois': gt_rois
}
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
bbox_transform_inv Ran
ran, honoured the contract we drafted
chenwuperth/rgz_rcnn/lib/fast_rcnn/bbox_transform.py
code served (permissive licence) · get_code("b3695ebe0c382b05")
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, 8) 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 small test data for bbox_transform_inv
# boxes: N x 4 array of bounding boxes [x1, y1, x2, y2]
# deltas: N x (4*K) array of box deltas for K classes

boxes = np.array([
    [10.0, 20.0, 50.0, 80.0],
    [100.0, 150.0, 200.0, 250.0]
], dtype=np.float32)

# deltas: 2 boxes, 2 classes (8 columns: dx, dy, dw, dh for each class)
deltas = np.array([
    [0.1, 0.2, -0.1, 0.05, 0.15, 0.1, -0.2, 0.0],
    [-0.05, 0.0, 0.1, -0.1, 0.2, -0.15, 0.05, 0.1]
], dtype=np.float32)

ARGS = {
    "boxes": boxes,
    "deltas": deltas
}
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, 8) — shape (2, 8) 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
bias_variable Ran
ran on a synthesized input
mimikaan/Attention-Model/MNIST/ram/utils.py
code served (permissive licence) · get_code("4c60a7a3b18a04ae")
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 ResourceVariable, ndim 2, dtype family float, shape (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

def bias_variable(shape):
    initial = tf.constant(0.0, shape=shape)
    return tf.Variable(initial)

# Construct valid arguments for bias_variable
# The function takes a single parameter 'shape' which is a tuple or list of integers
# representing the shape of the bias variable to create

ARGS = {
    "shape": (4, 3)
}
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 ResourceVariable, ndim 2, dtype family float, shape (4, 3) — shape (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
clip_boxes Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
chenwuperth/rgz_rcnn/lib/fast_rcnn/bbox_transform.py
code served (permissive licence) · get_code("d24c99284beca7a6")
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 sample boxes array
# Shape: (num_boxes, num_coords) where coords are in format [x1, y1, x2, y2, ...]
# Using 2 boxes with 4 coordinates each (x1, y1, x2, y2)
boxes = np.array([
    [10.5, 20.3, 100.7, 150.2],
    [5.1, 15.8, 200.4, 300.9]
], dtype=np.float32)

# Image shape as (height, width)
im_shape = (256, 512)

ARGS = {
    "boxes": boxes,
    "im_shape": im_shape
}
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
deg2rad Ran
ran on a synthesized input
kevinzakka/spatial-transformer-network/utils.py
code served (permissive licence) · get_code("37ca698729436046")
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 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 numpy as np

def deg2rad(x):
    """Converts an angle in degrees to radians."""
    return x * np.pi / 180

# Create a small numpy array with angle values in degrees
x = np.array([0.0, 90.0, 180.0, 270.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 — 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 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
get_initial_weights Ran
ran; our contract draft was wrong, not the code
oarriaga/spatial_transformer_networks/src/models/utils.py
code served (permissive licence) · get_code("254c0867f0a6fecb")
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 numpy as np

# The function get_initial_weights takes output_size as a parameter
# and uses it to create a weight matrix W of shape (output_size, 6)
# It returns a list of two elements: W and a flattened bias matrix b

output_size = 5

ARGS = {
    "output_size": output_size
}
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 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
img2array Ran
ran on a synthesized input
kevinzakka/spatial-transformer-network/utils.py
code served (permissive licence) · get_code("0636d4c4d3190d02")
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 (4, 3, 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
from PIL import Image
import tempfile
import os

# Create a temporary RGB image file
temp_dir = tempfile.mkdtemp()
img_path = os.path.join(temp_dir, "test_image.png")

# Create a small test image (4x3 RGB)
test_img = Image.new('RGB', (3, 4), color=(100, 150, 200))
test_img.save(img_path)

ARGS = {
    'data_path': img_path,
    'desired_size': (4, 3),
    'expand': False,
    'view': False
}
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 3, dtype family float, shape (4, 3, 3) — shape (4, 3, 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
inverse_pyramid Ran
ran on a synthesized input
dabane-ghassan/int-lab-book/src/POLO/PYramid2.py
code served (permissive licence) · get_code("bfe7459e545240af")
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 4, dtype family float, shape (2, 3, 256, 512) 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)

# Construct img_crop tensor
# Shape: (batch, n_levels, channels, height, width)
# For color=True case, we need img_crop with shape (N_batch, n_levels, 3, width, width)
# where width is the base width (32)
N_batch = 2
n_channels = 3
width = 32
n_levels = 4

# Create a pyramid structure with decreasing resolutions
# img_crop has shape (batch, levels, channels, height, width)
img_crop = torch.randn(N_batch, n_levels, n_channels, width, width)

ARGS = {
    'img_crop': img_crop,
    'N_X': 256,
    'N_Y': 512,
    'base_levels': 2,
    'color': True,
    'verbose': False,
    'gauss': False,
    'n_levels': None,
    'color_test': False,
}
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 4, dtype family float, shape (2, 3, 256, 512) — shape (2, 3, 256, 512) 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
minmax Ran
ran on a synthesized input
dabane-ghassan/int-lab-book/src/what_where/display.py
code served (permissive licence) · get_code("55cf5bb59b4c12a8")
How it ran

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

import torch

torch.manual_seed(0)

# The minmax function takes a value and a border parameter
# and clamps the value between -border and border
# Both parameters should be numeric (int, float, or tensor)

value = 5.0
border = 3.0

ARGS = {
    "value": value,
    "border": border
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
spatial_transformer_network Ran
ran on a synthesized input
kevinzakka/spatial-transformer-network/stn/transformer.py
code served (permissive licence) · get_code("f091d5b52d603b24")
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, 4, 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 tensorflow as tf
import numpy as np

# Create small test tensors
batch_size = 2
height = 4
width = 3
channels = 2

# Create input feature map (B, H, W, C)
input_fmap = tf.constant(
    np.random.randn(batch_size, height, width, channels).astype(np.float32)
)

# Create theta (affine transformation parameters) of shape (B, 2, 3)
# Identity transform with small perturbation
theta = tf.constant([
    [[1.0, 0.0, 0.0],
     [0.0, 1.0, 0.0]],
    [[1.0, 0.0, 0.1],
     [0.0, 1.0, 0.0]]
], dtype=tf.float32)

# Output dimensions
out_dims = (height, width)

ARGS = {
    'input_fmap': input_fmap,
    'theta': theta,
    'out_dims': out_dims,
}
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, 4, 3, 2) — shape (2, 4, 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
test Ran
ran on a synthesized input
dabane-ghassan/int-lab-book/src/what_where/what.py
code served (permissive licence) · get_code("a5fa28bbc8a62fb2")
How it ran

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

import torch
import torch.nn as nn

torch.manual_seed(0)

# Build a minimal model that satisfies the function's usage:
# - Takes data input and produces output
# - output has argmax(dim=1) method (so it's a tensor)
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)  # input dim 4, output dim 3 (for 3 classes)
    
    def forward(self, x):
        return self.linear(x)

# Build test loader as list of (data, target) tuples
# Batch size 2, input feature dim 4, 3 classes
test_loader = [
    (torch.randn(2, 4), torch.tensor([0, 1])),
    (torch.randn(2, 4), torch.tensor([2, 0]))
]

# Add dataset attribute to test_loader so len(test_loader.dataset) works
class TestLoaderWrapper:
    def __init__(self, data):
        self.data = data
        self.dataset = type('Dataset', (), {'__len__': lambda self: 4})()
    
    def __iter__(self):
        return iter(self.data)

test_loader_wrapped = TestLoaderWrapper(test_loader)

# Build arguments
ARGS = {
    'args': None,  # args parameter is not used in the function body
    'model': SimpleModel(),
    'device': torch.device('cpu'),
    'test_loader': test_loader_wrapped,
    'loss_function': nn.CrossEntropyLoss()
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
test Ran
ran on a synthesized input
dabane-ghassan/int-lab-book/src/what_where/where.py
code served (permissive licence) · get_code("6da6edb8aece76fb")
How it ran

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

import torch
import torch.nn as nn
from torch.autograd import Variable

torch.manual_seed(0)

# Create a minimal model that accepts input and produces output
class SimpleModel(nn.Module):
    def __init__(self):
        super(SimpleModel, self).__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Create minimal args dict
args = {}

# Create model
model = SimpleModel()

# Create device
device = torch.device('cpu')

# Create a minimal test loader
# Each batch should have 7 elements: (data, data_fullfield, target, target_fullfield, label, i_shift, j_shift)
test_loader = [
    (
        torch.randn(2, 4),           # data: batch_size=2, features=4
        torch.randn(2, 5),           # data_fullfield: different size
        torch.randn(2, 3),           # target: batch_size=2, features=3
        torch.randn(2, 6),           # target_fullfield: different size
        torch.randn(2, 1),           # label
        torch.randn(2, 1),           # i_shift
        torch.randn(2, 1)            # j_shift
    ),
    (
        torch.randn(2, 4),
        torch.randn(2, 5),
        torch.randn(2, 3),
        torch.randn(2, 6),
        torch.randn(2, 1),
        torch.randn(2, 1),
        torch.randn(2, 1)
    )
]

# Create loss function
loss_function = nn.MSELoss()

ARGS = {
    'args': args,
    'model': model,
    'device': device,
    'test_loader': test_loader,
    'loss_function': loss_function
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
unique_boxes Ran
ran, honoured the contract we drafted
chenwuperth/rgz_rcnn/lib/datasets/ds_utils.py
code served (permissive licence) · get_code("8a015c012f507631")
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 (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

# Create a small array of bounding boxes
# boxes should be a 2D numpy array where each row is a box (x1, y1, x2, y2)
boxes = np.array([
    [10.5, 20.3, 100.7, 200.9],
    [10.5, 20.3, 100.7, 200.9],  # duplicate
    [15.2, 25.1, 105.3, 205.5],
], dtype=np.float32)

scale = 1.0

ARGS = {
    "boxes": boxes,
    "scale": scale
}
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 (2,) — shape (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
update_results Ran
ran on a synthesized input
dabane-ghassan/int-lab-book/src/what_where/params.py
code served (permissive licence) · get_code("e821564998838029")
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 dict. 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
from scipy.stats import beta

torch.manual_seed(0)

# Construct arguments for update_results function
results = {}

parameter = "learning_rate"

# Create accuracies dict with numpy arrays
# Each value maps to an array of accuracy measurements
# The function uses [:-1] to slice all but last element, and .mean()
accuracies = {
    0.001: np.array([0.85, 0.87, 0.86, 0.88, 0.89]),
    0.01: np.array([0.90, 0.91, 0.89, 0.92, 0.88]),
    0.1: np.array([0.75, 0.76, 0.74, 0.77, 0.78])
}

ci = 0.01

ARGS = {
    "results": results,
    "parameter": parameter,
    "accuracies": accuracies,
    "ci": ci
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
view_data Ran
ran on a synthesized input
dabane-ghassan/int-lab-book/src/utils.py
code served (permissive licence) · get_code("1d6d0f48d1aff5b7")
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 Figure. 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 matplotlib.pyplot as plt

torch.manual_seed(0)

# Create small tensors for the function
# data shape: (batch_size, channels, height, width) = (2, 1, 4, 4)
data = torch.randn(2, 1, 4, 4)

# label shape: (batch_size,) with integer labels
label = torch.tensor([3, 7])

# n: number of subplots to display
n = 2

ARGS = {
    "data": data,
    "label": label,
    "n": n
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Figure — a Figure output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Figure 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
view_data_rand Ran
ran on a synthesized input
dabane-ghassan/int-lab-book/src/utils.py
code served (permissive licence) · get_code("a174d68d46e60b26")
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 Figure. 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 torch.utils.data

torch.manual_seed(0)

# Create small tensors for data and labels
# data shape: (batch_size, channels, height, width) = (2, 1, 4, 3)
# label shape: (batch_size,) with integer labels
data = torch.randn(2, 1, 4, 3)
label = torch.tensor([0, 1])

# Create a simple dataset class
class SimpleDataset(torch.utils.data.Dataset):
    def __init__(self, data, label):
        self.data = data
        self.label = label
    
    def __len__(self):
        return len(self.data)
    
    def __getitem__(self, idx):
        return self.data[idx], self.label[idx]

# Create dataset and dataloader
dataset = SimpleDataset(data, label)
loader = torch.utils.data.DataLoader(dataset, batch_size=2, shuffle=False)

ARGS = {
    "loader": loader,
    "n": 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Figure — a Figure output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Figure 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
where_suffix Ran
ran on a synthesized input
dabane-ghassan/int-lab-book/src/what_where/where.py
code served (permissive licence) · get_code("0dfdbaf4296b86c7")
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 torch
import argparse

# Create a namespace object to hold arguments
args = argparse.Namespace()

# Set all required attributes based on the function's usage
args.sf_0 = 0.5
args.B_sf = 2
args.noise = 0.1
args.contrast = 1.0
args.offset_std = 0.05
args.offset_max = 0.2
args.N_theta = 8
args.N_azimuth = 16
args.N_eccentricity = 4
args.N_phase = 2
args.rho = 0.9
args.N_pic = 100

ARGS = {'args': args}
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 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
xywh_to_xyxy Ran
ran, honoured the contract we drafted
chenwuperth/rgz_rcnn/lib/datasets/ds_utils.py
code served (permissive licence) · get_code("d3e019b11b709edb")
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 batch of boxes in [x y w h] format
# Using shape (2, 4) for 2 boxes with 4 coordinates each
boxes = np.array([
    [10.0, 20.0, 30.0, 40.0],  # x, y, width, height
    [5.0, 15.0, 25.0, 35.0]
], dtype=np.float32)

ARGS = {
    "boxes": boxes
}
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
xyxy_to_xywh Ran
ran, honoured the contract we drafted
chenwuperth/rgz_rcnn/lib/datasets/ds_utils.py
code served (permissive licence) · get_code("a832e5017f504280")
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 sample bounding boxes in [x1 y1 x2 y2] format
boxes = np.array([
    [10, 20, 50, 80],
    [100, 150, 200, 300]
], dtype=np.float32)

ARGS = {
    "boxes": boxes
}
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
MotionCloudNoise Not yet run
unverified (harvested, no recorded run)
dabane-ghassan/int-lab-book/src/what_where/display.py
code served (permissive licence) · get_code("79325aefec89c096")
How it ran

no invocation recorded.

STN Not yet run
unverified (harvested, no recorded run)
oarriaga/spatial_transformer_networks/src/models/STN.py
code served (permissive licence) · get_code("fea0ac5e46a518e4")
How it ran

no invocation recorded.

ThinPlateSpline Not yet run
unverified (harvested, no recorded run)
iwyoo/tf_thinplatespline/ThinPlateSpline.py
code served (permissive licence) · get_code("8021de30a8d4e788")
How it ran

no invocation recorded.

ThinPlateSpline2 Not yet run
unverified (harvested, no recorded run)
iwyoo/tf_thinplatespline/ThinPlateSpline2.py
code served (permissive licence) · get_code("273b53d53de15ad7")
How it ran

no invocation recorded.

color_encode Not yet run
unverified (harvested, no recorded run)
dabane-ghassan/int-lab-book/src/POLO/PYramid2.py
code served (permissive licence) · get_code("eb493f3004a0f740")
How it ran

no invocation recorded.

get_data_loader Not yet run
unverified (harvested, no recorded run)
dabane-ghassan/int-lab-book/src/what_where/display.py
code served (permissive licence) · get_code("5852a12af5d2eee4")
How it ran

no invocation recorded.

get_imdb Not yet run
unverified (harvested, no recorded run)
chenwuperth/rgz_rcnn/lib/datasets/factory.py
code served (permissive licence) · get_code("9f3cea1708a8a9db")
How it ran

no invocation recorded.

get_output_dir Not yet run
unverified (harvested, no recorded run)
chenwuperth/rgz_rcnn/lib/fast_rcnn/config.py
code served (permissive licence) · get_code("4786edbc775d299d")
How it ran

no invocation recorded.

get_pixel_value Not yet run
unverified (harvested, no recorded run)
kevinzakka/spatial-transformer-network/stn/transformer.py
code served (permissive licence) · get_code("aee541a70e048281")
How it ran

no invocation recorded.

weight_variable Not yet run
unverified (harvested, no recorded run)
mimikaan/Attention-Model/MNIST/ram/utils.py
code served (permissive licence) · get_code("9de931a21d52f0d1")
How it ran

no invocation recorded.

Also present in other papers' code

Of 31 samples lifted from this paper's linked repositories, 31 carry a function identity and 0 do not. Of the 31 distinct functions with an identity, 10 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 8 the same month, 10 later) and 21 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
xywh_to_xyxy 21 other papers
1 the same month, 20 later
1506.01497 (2015-06)
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
1605.06409 (2016-05)
R-FCN: Object Detection via Region-based Fully Convolutional Networks
1609.03605 (2016-09)
Detecting Text in Natural Image with Connectionist Text Proposal Network
and 18 more not named here
xyxy_to_xywh 21 other papers
1 the same month, 20 later
1506.01497 (2015-06)
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
1605.06409 (2016-05)
R-FCN: Object Detection via Region-based Fully Convolutional Networks
1609.03605 (2016-09)
Detecting Text in Natural Image with Connectionist Text Proposal Network
and 18 more not named here
unique_boxes 20 other papers
1 the same month, 19 later
1506.01497 (2015-06)
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
1511.02853 (2015-11)
Weakly Supervised Deep Detection Networks
1605.06409 (2016-05)
R-FCN: Object Detection via Region-based Fully Convolutional Networks
and 17 more not named here
clip_boxes 7 other papers
1 the same month, 6 later
1506.01497 (2015-06)
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
1609.03605 (2016-09)
Detecting Text in Natural Image with Connectionist Text Proposal Network
1611.06607 (2016-11)
A Hierarchical Approach for Generating Descriptive Image Paragraphs
and 4 more not named here
bbox_transform 4 other papers
1 the same month, 3 later
1506.01497 (2015-06)
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
1609.03605 (2016-09)
Detecting Text in Natural Image with Connectionist Text Proposal Network
1611.06607 (2016-11)
A Hierarchical Approach for Generating Descriptive Image Paragraphs
and 1 more not named here
bbox_transform_inv 4 other papers
1 the same month, 3 later
1506.01497 (2015-06)
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
1612.03144 (2016-12)
Feature Pyramid Networks for Object Detection
1702.06355 (2017-02)
Object Detection in Videos with Tubelet Proposal Networks
and 1 more not named here
get_imdb 4 other papers
1 the same month, 3 later
1506.01497 (2015-06)
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
1507.00448 (2015-07)
Cross Modal Distillation for Supervision Transfer
1611.06607 (2016-11)
A Hierarchical Approach for Generating Descriptive Image Paragraphs
and 1 more not named here
get_pixel_value 4 other papers
4 later
1902.09145 (2019-02)
DDFlow: Learning Optical Flow with Unlabeled Data Distillation
1904.09117 (2019-04)
SelFlow: Self-Supervised Learning of Optical Flow
2006.05854 (2020-06)
Learning the Geometry of Wave-Based Imaging
and 1 more not named here
get_output_dir 2 other papers
1 the same month, 1 later
1506.01497 (2015-06)
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
1611.06607 (2016-11)
A Hierarchical Approach for Generating Descriptive Image Paragraphs
get_initial_weights 1 other paper
1 later
2401.07604 (2024-01)
Data Assimilation using ERA5, ASOS, and the U-STN model for Weather Forecasting over the UK

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

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

Convolutional Neural Networks define an exceptionally powerful class of models, but are still limited by the lack of ability to be spatially invariant to the input data in a computationally and parameter efficient manner. In this work we introduce a new learnable module, the Spatial Transformer, which explicitly allows the spatial manipulation of data within the network. This differentiable module can be inserted into existing convolutional architectures, giving neural networks the ability to actively spatially transform feature maps, conditional on the feature map itself, without any extra training supervision or modification to the optimisation process. We show that the use of spatial transformers results in models which learn invariance to translation, scale, rotation and more generic warping, resulting in state-of-the-art performance on several benchmarks, and for a number of classes of transformations.

For agents

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

get_harvested_code_for_paper("1506.02025")
get_code_for_paper("1506.02025")
have("1506.02025")

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

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

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

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

Connect an agent — have() is free.