SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2105.15203 · NeurIPS · 2021

SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers

Anima Anandkumar, Ping Luo, Zhiding Yu, Caltech, Enze Xie, Jose Alvarez, Wenhai Wang

arXiv · PDF · Open in the Atlas

Code that ran

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

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2105.15203.json · badge: /api/ran/2105.15203.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
alessiomora/unlearning_fl community (classifier label)
classifier basis not recorded on the link
10 ran · 3 no recorded run
IMvision12/SegFormer-tf community
Papers with Code archive
9 ran · 3 no recorded run
VikParuchuri/surya community (classifier label)
classifier basis not recorded on the link
8 ran · 1 no recorded run
lucidrains/segformer-pytorch reimplementation (classifier label)
classifier basis: classifier_2025
6 ran · 2 no recorded run
UAws/CV-3315-Is-All-You-Need community (classifier label)
classifier basis not recorded on the link
6 ran · 1 no recorded run
JoegameZhou/Segmenter_workers community (classifier label)
classifier basis not recorded on the link
6 ran · 0 no recorded run
DarshanDeshpande/jax-models community
Papers with Code archive
5 ran · 4 no recorded run
macdonaldezra/minesegsat community
Papers with Code archive
5 ran · 2 no recorded run
DavidLandup0/deepvision community
Papers with Code archive
4 ran · 3 no recorded run
sithu31296/semantic-segmentation community
Papers with Code archive
4 ran · 1 no recorded run
rulixiang/segformer-pytorch reimplementation (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
Attention Ran
ran on a synthesized input · constructed an object; no result was computed
IMvision12/SegFormer-tf/models/segformer.py
pointer only (licence: NONE) · get_code("c26b3dcb83805d8b")
How it ran

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

Block Ran
ran on a synthesized input · constructed an object; no result was computed
IMvision12/SegFormer-tf/models/segformer.py
pointer only (licence: NONE) · get_code("0730c486d30ba0ad")
How it ran

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

ConvModule Ran
ran on a synthesized input · constructed an object; no result was computed
IMvision12/SegFormer-tf/models/segformer.py
pointer only (licence: NONE) · get_code("985e0029300d8b09")
How it ran

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

ConvModule Ran
ran on a synthesized input · constructed an object; no result was computed
sithu31296/semantic-segmentation/semseg/models/segformer.py
code served (permissive licence) · get_code("8e948e9bc7b5fc17")
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 an instance of its own class, ConvModule: the run constructed the object and did not call it, so no result was computed. 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.nn as nn
from torch import Tensor

torch.manual_seed(0)

ARGS = {
    "c1": 3,
    "c2": 16,
}
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 ConvModule — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ConvModule 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
DWConv Ran
ran on a synthesized input · constructed an object; no result was computed
IMvision12/SegFormer-tf/models/segformer.py
pointer only (licence: NONE) · get_code("4817e9583fbf6b3c")
How it ran

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

DepthwiseConv2D Ran
ran on a synthesized input · constructed an object; no result was computed
DarshanDeshpande/jax-models/jax_models/models/segformer.py
code served (permissive licence) · get_code("ccadeb436e01c85c")
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 an instance of its own class, DepthwiseConv2D: the run constructed the object and did not call it, so no result was computed. 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 jax
import jax.numpy as jnp
import flax.linen as nn
from typing import Callable, Optional, Sequence, Tuple, Union

# Set seed for reproducibility
jax.config.update('jax_platform_name', 'cpu')

# Create a small input tensor for testing
# Shape: (batch=2, height=4, width=3, channels=2)
input_tensor = jnp.ones((2, 4, 3, 2), dtype=jnp.float32)

# Define valid arguments for DepthwiseConv2D
ARGS = {
    'kernel_shape': (3, 3),
    'stride': (1, 1),
    'padding': 'SAME',
    'channel_multiplier': 1,
    'use_bias': True,
    'weights_init': nn.initializers.lecun_uniform(),
    'bias_init': nn.initializers.zeros,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DepthwiseConv2D — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a DepthwiseConv2D 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
DropPath Ran
ran on a synthesized input
IMvision12/SegFormer-tf/models/segformer.py
pointer only (licence: NONE) · get_code("4b04a139b83d832e")
How it ran

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

DropPath Ran
ran on a synthesized input · constructed an object; no result was computed
DarshanDeshpande/jax-models/jax_models/models/segformer.py
code served (permissive licence) · get_code("8085cbc641b30993")
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 an instance of its own class, DropPath: the run constructed the object and did not call it, so no result was computed. 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 jax
import jax.numpy as jnp
import flax.linen as nn
from jax import random

# Create a small input tensor for testing
# Shape: (batch_size=2, height=4, width=4, channels=3)
key = random.PRNGKey(0)
input_tensor = jnp.ones((2, 4, 4, 3))

# Define the arguments dictionary
ARGS = {
    'dropout_prob': 0.1,
    'deterministic': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DropPath — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a DropPath 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
DsConv2d Ran
ran on a synthesized input · constructed an object; no result was computed
lucidrains/segformer-pytorch/segformer_pytorch/segformer_pytorch.py
code served (permissive licence) · get_code("10e1daaea8547fb9")
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 an instance of its own class, DsConv2d: the run constructed the object and did not call it, so no result was computed. 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
from torch import nn

torch.manual_seed(0)

ARGS = {
    'dim_in': 4,
    'dim_out': 8,
    'kernel_size': 3,
    'padding': 1,
    'stride': 1,
    'bias': True,
}
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 DsConv2d — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a DsConv2d 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
EfficientSelfAttention Ran
ran on a synthesized input
lucidrains/segformer-pytorch/segformer_pytorch/segformer_pytorch.py
code served (permissive licence) · get_code("542396928de7e36a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, 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 torch
import numpy as np

# INIT_ARGS for EfficientSelfAttention.__init__
INIT_ARGS = {
    'dim': 8,
    'heads': 2,
    'reduction_ratio': 2
}

# ARGS for EfficientSelfAttention.forward
# Input is a 4D tensor: (batch, channels, height, width)
# dim must match INIT_ARGS['dim']
# height and width can be any spatial dimensions
ARGS = {
    'x': torch.randn(2, 8, 6, 4)
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
einops, 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 — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
EfficientSelfAttention Ran
ran on a synthesized input
macdonaldezra/minesegsat/mine_seg_sat/models/segformer.py
code served (permissive licence) · get_code("5049266ef99b4d26")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, 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 torch
from timm.models.layers import drop_path, trunc_normal_

class EfficientSelfAttention(torch.nn.Module):
    """
    A multi-head self-attention layer that improves computational efficiency by reducing the
    length of the input sequence to the attention layer.
    """

    def __init__(self, hidden_size, num_heads, dropout_p, sequence_reduction_ratio):
        super().__init__()
        if hidden_size % num_heads != 0:
            raise ValueError(f'The hidden size ({hidden_size}) is not a multiple of the number of attention heads ({num_heads})')
        self.hidden_size = hidden_size
        self.num_heads = num_heads
        self.attention_head_size = self.hidden_size // self.num_heads
        self.all_head_size = self.num_heads * self.attention_head_size
        self.attn_score_divisor = self.attention_head_size ** 0.5
        self.query = torch.nn.Linear(self.hidden_size, self.hidden_size)
        self.key = torch.nn.Linear(self.hidden_size, self.hidden_size)
        self.value = torch.nn.Linear(self.hidden_size, self.hidden_size)
        self.dropout = torch.nn.Dropout(dropout_p)
        self.dense = torch.nn.Linear(self.hidden_size, self.hidden_size)
        self.sr_ratio = sequence_reduction_ratio
        if sequence_reduction_ratio > 1:
            self.sr = torch.nn.Conv2d(hidden_size, hidden_size, kernel_size=sequence_reduction_ratio, stride=sequence_reduction_ratio)
            self.layer_norm = torch.nn.LayerNorm(hidden_size)
        self.apply(self._init_weights)

    def _init_weights(self, m):
        if isinstance(m, torch.nn.Linear):
            trunc_normal_(m.weight, std=0.02)
            if isinstance(m, torch.nn.Linear) and m.bias is not None:
                torch.nn.init.constant_(m.bias, 0)
        elif isinstance(m, torch.nn.LayerNorm):
            torch.nn.init.constant_(m.bias, 0)
            torch.nn.init.constant_(m.weight, 1.0)
        elif isinstance(m, torch.nn.Conv2d):
            torch.nn.init.kaiming_normal_(m.weight, mode='fan_out', nonlinearity='relu')

    def forward(self, hidden_states, height, width, return_attn: bool=False):
        batch, n, c = hidden_states.shape
        q = self.query(hidden_states).reshape(batch, n, self.num_heads, c // self.num_heads).permute(0, 2, 1, 3)
        if self.sr_ratio > 1:
            x = hidden_states.permute(0, 2, 1).reshape(batch, c, height, width)
            x = self.sr(x).reshape(batch, c, -1).permute(0, 2, 1).contiguous()
            x = self.layer_norm(x)
            hidden_states = x
        k = self.key(hidden_states).reshape(batch, -1, self.num_heads, c // self.num_heads).permute(0, 2, 1, 3)
        v = self.value(hidden_states).reshape(batch, -1, self.num_heads, c // self.num_heads).permute(0, 2, 1, 3)
        attn = torch.matmul(q, k.transpose(-2, -1)) / self.attn_score_divisor
        attention_probs = torch.nn.functional.softmax(attn, dim=-1)
        attention_probs = self.dropout(attention_probs)
        outputs = torch.matmul(attention_probs, v).transpose(1, 2).reshape(batch, n, c)
        outputs = self.dense(outputs)
        outputs = self.dropout(outputs)
        if return_attn:
            attn_output = {'key': k, 'value': v, 'query': q, 'attention': attention_probs}
            return (outputs, attn_output)
        return outputs


INIT_ARGS = {
    'hidden_size': 8,
    'num_heads': 2,
    'dropout_p': 0.1,
    'sequence_reduction_ratio': 1,
}

ARGS = {
    'hidden_states': torch.randn(2, 12, 8),
    'height': 4,
    'width': 3,
    'return_attn': False,
}

if __name__ == '__main__':
    model = EfficientSelfAttention(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output: {output}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
timm, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
MLP Ran
ran on a synthesized input · constructed an object; no result was computed
IMvision12/SegFormer-tf/models/segformer.py
pointer only (licence: NONE) · get_code("7ff5661a4c26fcb7")
How it ran

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

MLP Ran
ran on a synthesized input · constructed an object; no result was computed
sithu31296/semantic-segmentation/semseg/models/segformer.py
code served (permissive licence) · get_code("4e9019271c54ae21")
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 an instance of its own class, MLP: the run constructed the object and did not call it, so no result was computed. 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.nn as nn

torch.manual_seed(0)

ARGS = {
    "dim": 4,
    "embed_dim": 3,
}
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 MLP — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MLP 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
MLPHead Ran
ran on a synthesized input · constructed an object; no result was computed
DarshanDeshpande/jax-models/jax_models/models/segformer.py
code served (permissive licence) · get_code("1cca7df806bbd21f")
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 an instance of its own class, MLPHead: the run constructed the object and did not call it, so no result was computed. 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 jax
import jax.numpy as jnp
import flax.linen as nn

class MLPHead(nn.Module):
    emb_dim: int = 768

    @nn.compact
    def __call__(self, inputs):
        batch, height, width, channels = inputs.shape
        x = jnp.reshape(inputs, (batch, height * width, channels))
        x = nn.Dense(self.emb_dim)(x)
        return x

# Create a small input tensor: (batch=2, height=3, width=4, channels=5)
inputs = jnp.ones((2, 3, 4, 5))

# Create the model instance with custom emb_dim
model = MLPHead(emb_dim=768)

# Initialize the model parameters
key = jax.random.PRNGKey(0)
params = model.init(key, inputs)

ARGS = {
    'emb_dim': 768
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MLPHead — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MLPHead 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
MiT Ran
ran on a synthesized input · constructed an object; no result was computed
lucidrains/segformer-pytorch/segformer_pytorch/segformer_pytorch.py
code served (permissive licence) · get_code("a3c01f13dc01b670")
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 an instance of its own class, MiT: the run constructed the object and did not call it, so no result was computed. 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.nn as nn
from math import sqrt

torch.manual_seed(0)

ARGS = {
    "channels": 3,
    "dims": (32, 64, 128, 256),
    "heads": (1, 2, 4, 8),
    "ff_expansion": (4, 4, 4, 4),
    "reduction_ratio": (8, 4, 2, 1),
    "num_layers": (2, 2, 2, 2),
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MiT — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MiT 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
MixFeedForward Ran
ran on a synthesized input · constructed an object; no result was computed
lucidrains/segformer-pytorch/segformer_pytorch/segformer_pytorch.py
code served (permissive licence) · get_code("ff4bb124dc115d63")
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 an instance of its own class, MixFeedForward: the run constructed the object and did not call it, so no result was computed. 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.nn as nn

torch.manual_seed(0)

ARGS = {
    'dim': 4,
    'expansion_factor': 2
}
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 MixFeedForward — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MixFeedForward 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
MixedFeedForwardNetwork Ran
ran on a synthesized input
macdonaldezra/minesegsat/mine_seg_sat/models/segformer.py
code served (permissive licence) · get_code("46464f58f54aa5a0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, 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 torch
import numpy as np

# INIT_ARGS for MixedFeedForwardNetwork.__init__
INIT_ARGS = {
    'in_features': 8,
    'out_features': 8,
    'hidden_features': 12,
    'dropout_p': 0.1
}

# ARGS for MixedFeedForwardNetwork.forward
# The input tensor x should have shape (batch, seq_len, in_features)
# where seq_len = height * width
batch_size = 2
height = 4
width = 3
seq_len = height * width  # 12

x = torch.randn(batch_size, seq_len, INIT_ARGS['in_features'])

ARGS = {
    'x': x,
    'height': height,
    'width': width
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 3, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
Mlp Ran
ran on a synthesized input · constructed an object; no result was computed
IMvision12/SegFormer-tf/models/segformer.py
pointer only (licence: NONE) · get_code("635ca5ddeb4973f7")
How it ran

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

OverlapPatchEmbed Ran
ran on a synthesized input · constructed an object; no result was computed
IMvision12/SegFormer-tf/models/segformer.py
pointer only (licence: NONE) · get_code("31c432acc4aa0d25")
How it ran

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

OverlapPatchEmbedding Ran
ran on a synthesized input
macdonaldezra/minesegsat/mine_seg_sat/models/segformer.py
code served (permissive licence) · get_code("79ded40dd7812caf")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) 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 math
import torch
from timm.models.layers import trunc_normal_

class OverlapPatchEmbedding(torch.nn.Module):

    def __init__(self, patch_size: int, stride: int, in_channels: int, embed_dim: int):
        super().__init__()
        self.patch_size = patch_size
        self.proj = torch.nn.Conv2d(in_channels, embed_dim, kernel_size=patch_size, stride=stride, padding=(patch_size // 2, patch_size // 2))
        self.norm = torch.nn.LayerNorm(embed_dim)
        self.apply(self._init_weights)

    def _init_weights(self, m):
        if isinstance(m, torch.nn.Linear):
            trunc_normal_(m.weight, std=0.02)
            if isinstance(m, torch.nn.Linear) and m.bias is not None:
                torch.nn.init.constant_(m.bias, 0)
        elif isinstance(m, torch.nn.LayerNorm):
            torch.nn.init.constant_(m.bias, 0)
            torch.nn.init.constant_(m.weight, 1.0)
        elif isinstance(m, torch.nn.Conv2d):
            fan_out = m.kernel_size[0] * m.kernel_size[1] * m.out_channels
            fan_out //= m.groups
            m.weight.data.normal_(0, math.sqrt(2.0 / fan_out))
            if m.bias is not None:
                m.bias.data.zero_()

    def forward(self, x):
        x = self.proj(x)
        _, _, h, w = x.shape
        x = x.flatten(2).transpose(1, 2)
        x = self.norm(x)
        return (x, h, w)


INIT_ARGS = {
    'patch_size': 3,
    'stride': 2,
    'in_channels': 4,
    'embed_dim': 8,
}

ARGS = {
    'x': torch.randn(2, 4, 16, 12),
}

if __name__ == '__main__':
    model = OverlapPatchEmbedding(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output type: {type(output)}")
    print(f"Output[0] shape: {output[0].shape}")
    print(f"Output[1] (h): {output[1]}")
    print(f"Output[2] (w): {output[2]}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
timm, torch — 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
PreNorm Ran
ran on a synthesized input · constructed an object; no result was computed
lucidrains/segformer-pytorch/segformer_pytorch/segformer_pytorch.py
code served (permissive licence) · get_code("748000c608a20c77")
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 an instance of its own class, PreNorm: the run constructed the object and did not call it, so no result was computed. 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
from torch import nn

torch.manual_seed(0)

# Define a simple function module that will be used as fn parameter
class SimpleFn(nn.Module):
    def __init__(self, dim):
        super().__init__()
        self.linear = nn.Linear(dim, dim)
    
    def forward(self, x):
        # x shape: (batch, dim, height, width)
        # Reshape to (batch, dim, -1) for linear layer
        batch, dim, height, width = x.shape
        x_reshaped = x.view(batch, dim, -1)
        x_reshaped = x_reshaped.transpose(1, 2)  # (batch, hw, dim)
        x_out = self.linear(x_reshaped)
        x_out = x_out.transpose(1, 2)  # (batch, dim, hw)
        x_out = x_out.view(batch, dim, height, width)
        return x_out

# Create the function module
fn_module = SimpleFn(dim=4)

ARGS = {
    'dim': 4,
    'fn': fn_module
}
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 PreNorm — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a PreNorm 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
SegFormer Ran
ran on a synthesized input · constructed an object; no result was computed
sithu31296/semantic-segmentation/semseg/models/segformer.py
code served (permissive licence) · get_code("21d890715e16872d")
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 an instance of its own class, SegFormer: the run constructed the object and did not call it, so no result was computed. 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.nn as nn
from torch import Tensor
from typing import Tuple

torch.manual_seed(0)

# Create a minimal backbone that satisfies MiT usage
class MinimalBackbone(nn.Module):
    def __init__(self):
        super().__init__()
        self.channels = [32, 64, 128, 256]
        self.conv1 = nn.Conv2d(3, 32, 3, padding=1)
        self.conv2 = nn.Conv2d(32, 64, 3, padding=1, stride=2)
        self.conv3 = nn.Conv2d(64, 128, 3, padding=1, stride=2)
        self.conv4 = nn.Conv2d(128, 256, 3, padding=1, stride=2)
    
    def forward(self, x: Tensor) -> Tuple[Tensor, Tensor, Tensor, Tensor]:
        x1 = self.conv1(x)
        x2 = self.conv2(x1)
        x3 = self.conv3(x2)
        x4 = self.conv4(x3)
        return (x1, x2, x3, x4)

# Mock the MiT function that gets eval'd
def MiT(variant):
    return MinimalBackbone()

# Create minimal implementation of trunc_normal_ if not available
def trunc_normal_(tensor, mean=0., std=1., a=-2., b=2.):
    return nn.init.normal_(tensor, mean, std)

# Inject into globals for eval() to find
import sys
module = sys.modules[__name__]
setattr(module, 'trunc_normal_', trunc_normal_)
setattr(module, 'MiT', MiT)

# Now we can construct ARGS for SegFormer
ARGS = {
    'backbone': 'MiT-B0',
    'num_classes': 19,
}
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 SegFormer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a SegFormer 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
SegFormerDecoder Ran
ran on a synthesized input
macdonaldezra/minesegsat/mine_seg_sat/models/segformer.py
code served (permissive licence) · get_code("c1cec60a6c890710")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 4, dtype family float, shape (2, 3, 16, 20) 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.functional as F

class SegFormerDecoder(torch.nn.Module):

    def __init__(self, in_channels: tuple[int], num_classes: int, embed_dim: int, dropout_p: float=0.0) -> None:
        super().__init__()
        self.in_channels = in_channels
        self.num_classes = num_classes
        self.embed_dim = embed_dim
        self.dropout_p = dropout_p
        self.layers = torch.nn.ModuleList([torch.nn.Conv2d(channels, embed_dim, (1, 1)) for channels in reversed(in_channels)])
        self.linear_fuse = torch.nn.Conv2d(embed_dim * len(self.in_channels), embed_dim, kernel_size=1, bias=False)
        self.batch_norm = torch.nn.BatchNorm2d(embed_dim, eps=1e-05)
        self.activation = torch.nn.ReLU()
        self.dropout = torch.nn.Dropout(p=dropout_p)
        self.classifier = torch.nn.Conv2d(embed_dim, num_classes, kernel_size=1)
        self._init_weights()

    def _init_weights(self) -> None:
        torch.nn.init.kaiming_normal_(self.linear_fuse.weight, mode='fan_out', nonlinearity='relu')
        torch.nn.init.constant_(self.batch_norm.weight, 1)
        torch.nn.init.constant_(self.batch_norm.bias, 0)

    def forward(self, x):
        feature_size = x[0].shape[2:]
        x = [layer(x_i) for layer, x_i in zip(self.layers, reversed(x))]
        x = [F.interpolate(x_i, size=feature_size, mode='bilinear', align_corners=False) for x_i in x[:-1]] + [x[-1]]
        x = self.linear_fuse(torch.cat(x[::-1], dim=1))
        x = self.batch_norm(x)
        x = self.activation(x)
        x = self.dropout(x)
        x = self.classifier(x)
        return x


INIT_ARGS = {
    'in_channels': (8, 16),
    'num_classes': 3,
    'embed_dim': 4,
    'dropout_p': 0.1,
}

ARGS = {
    'x': [
        torch.randn(2, 8, 16, 20),
        torch.randn(2, 16, 8, 10),
    ],
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 4, dtype family float, shape (2, 3, 16, 20) — shape (2, 3, 16, 20) 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
SegFormerHead Ran
ran on a synthesized input · constructed an object; no result was computed
IMvision12/SegFormer-tf/models/segformer.py
pointer only (licence: NONE) · get_code("bc90afe01ade811b")
How it ran

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

SegFormerHead Ran
ran on a synthesized input · constructed an object; no result was computed
DarshanDeshpande/jax-models/jax_models/models/segformer.py
code served (permissive licence) · get_code("6caaf2219052f191")
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 an instance of its own class, SegFormerHead: the run constructed the object and did not call it, so no result was computed. 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 jax
import jax.numpy as jnp
from jax import random

# Set seed for reproducibility
key = random.PRNGKey(0)

# Create dummy input tensors (4 feature maps at different scales)
# Each has shape (batch, height, width, channels)
batch_size = 2
c1 = jnp.ones((batch_size, 8, 8, 64))  # largest spatial dims
c2 = jnp.ones((batch_size, 4, 4, 128))  # half spatial dims
c3 = jnp.ones((batch_size, 2, 2, 256))  # quarter spatial dims
c4 = jnp.ones((batch_size, 1, 1, 512))  # smallest spatial dims

inputs = (c1, c2, c3, c4)

ARGS = {
    'emb_dim': 256,
    'kernel_size': (1, 1),
    'stride': 1,
    'num_classes': 19,
    'drop': 0.1,
    'axis_name': None,
    'axis_index_groups': None,
    'deterministic': None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SegFormerHead — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a SegFormerHead 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
SegFormerHead Ran
ran on a synthesized input · constructed an object; no result was computed
sithu31296/semantic-segmentation/semseg/models/segformer.py
code served (permissive licence) · get_code("d8c46d51ed5de622")
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 an instance of its own class, SegFormerHead: the run constructed the object and did not call it, so no result was computed. 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.nn as nn
from torch import Tensor
from typing import Tuple

torch.manual_seed(0)

# Define ARGS dict with all parameters for SegFormerHead
ARGS = {
    'dims': [64, 128, 256, 512],
    'embed_dim': 256,
    'num_classes': 19,
}
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 SegFormerHead — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a SegFormerHead 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
SegFormerHead Ran
ran; our contract draft was wrong, not the code
DavidLandup0/deepvision/deepvision/models/segmentation/segformer/segformer.py
code served (permissive licence) · get_code("68f9e28fcc23bfc1")
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 __SegFormerHeadPT. 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)

ARGS = {
    'in_dims': [64, 128, 256, 512],
    'num_classes': 19,
    'backend': 'pytorch',
    'embed_dim': 256,
    'name': 'segformer_head'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type __SegFormerHeadPT — a __SegFormerHeadPT output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a __SegFormerHeadPT 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
Segformer Ran
ran on a synthesized input · constructed an object; no result was computed
lucidrains/segformer-pytorch/segformer_pytorch/segformer_pytorch.py
code served (permissive licence) · get_code("ce46b8418261110a")
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 an instance of its own class, Segformer: the run constructed the object and did not call it, so no result was computed. 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.nn as nn

torch.manual_seed(0)

ARGS = {
    "dims": (32, 64, 160, 256),
    "heads": (1, 2, 5, 8),
    "ff_expansion": (8, 8, 4, 4),
    "reduction_ratio": (8, 4, 2, 1),
    "num_layers": (2, 2, 2, 2),
    "channels": 3,
    "decoder_dim": 256,
    "num_classes": 4,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Segformer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Segformer 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
TransformerBlock Ran
ran on a synthesized input
macdonaldezra/minesegsat/mine_seg_sat/models/segformer.py
code served (permissive licence) · get_code("89979e961601b054")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, 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 torch
import numpy as np

# INIT_ARGS for TransformerBlock.__init__
INIT_ARGS = {
    'input_dim': 8,
    'num_heads': 2,
    'dropout_p': 0.1,
    'dropout_path_p': 0.1,
    'sr_ratio': 2
}

# For forward method: (x, height, width, return_attn)
# x should have shape (batch, n, c) where n = height * width and c = input_dim
batch_size = 2
height = 4
width = 6
n = height * width  # 24
c = INIT_ARGS['input_dim']  # 8

x = torch.randn(batch_size, n, c)

ARGS = {
    'x': x,
    'height': height,
    'width': width,
    'return_attn': False
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
numpy, timm, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
TransformerMLP Ran
ran on a synthesized input · constructed an object; no result was computed
DarshanDeshpande/jax-models/jax_models/models/segformer.py
code served (permissive licence) · get_code("6afe61dba51eef77")
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 an instance of its own class, TransformerMLP: the run constructed the object and did not call it, so no result was computed. 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 jax
import jax.numpy as jnp
import flax.linen as nn
from typing import Callable, Optional

# Set random seed for reproducibility
jax.config.update("jax_platform_name", "cpu")

ARGS = {
    'dim': 64,
    'out_dim': 32,
    'dropout': 0.1,
    'use_dwconv': False,
    'linear': False,
    'dense_kernel_init': nn.initializers.xavier_uniform(),
    'conv_kernel_init': nn.initializers.xavier_normal(),
    'deterministic': None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type TransformerMLP — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a TransformerMLP 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
__SegFormerHeadPT Ran
ran on a synthesized input
DavidLandup0/deepvision/deepvision/models/segmentation/segformer/segformer.py
code served (permissive licence) · get_code("df798977d45ef10d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 4, dtype family float, shape (2, 3, 8, 9) 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
from torch import nn
from torch.nn import functional as F
from typing import Tuple

class __SegFormerHeadPT(nn.Module):

    def __init__(self, in_dims, embed_dim=256, num_classes=19, name=None):
        super().__init__()
        self.linear_layers = torch.nn.ModuleList()
        for i, dim in enumerate(in_dims):
            self.linear_layers.append(nn.Linear(dim, embed_dim))
        self.linear_fuse = torch.nn.Sequential(nn.Conv2d(in_channels=embed_dim * 4, out_channels=embed_dim, kernel_size=1, bias=False), nn.BatchNorm2d(embed_dim), nn.ReLU())
        self.seg_out = nn.Conv2d(in_channels=embed_dim, out_channels=num_classes, kernel_size=1)
        self.dropout = nn.Dropout2d(0.1)

    def forward(self, features: Tuple) -> torch.Tensor:
        B, _, H, W = features[0].shape
        outs = []
        for feature, layer in zip(features, self.linear_layers):
            projected_features = layer(feature.flatten(2).transpose(1, 2)).permute(0, 2, 1).reshape(B, -1, feature.shape[-2], feature.shape[-1])
            outs.append(F.interpolate(projected_features, size=(H, W), mode='bilinear', align_corners=False))
        seg = self.seg_out(self.dropout(self.linear_fuse(torch.cat(outs[::-1], dim=1))))
        return seg


INIT_ARGS = {
    'in_dims': [4, 5, 6, 7],
    'embed_dim': 16,
    'num_classes': 3,
    'name': None
}

ARGS = {
    'features': (
        torch.randn(2, 4, 8, 9),
        torch.randn(2, 5, 8, 9),
        torch.randn(2, 6, 8, 9),
        torch.randn(2, 7, 8, 9)
    )
}

if __name__ == '__main__':
    model = __SegFormerHeadPT(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Expected shape: (2, 3, 8, 9)")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 4, dtype family float, shape (2, 3, 8, 9) — shape (2, 3, 8, 9) 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
__SegFormerHeadTF Ran
ran on a synthesized input
DavidLandup0/deepvision/deepvision/models/segmentation/segformer/segformer.py
code served (permissive licence) · get_code("d1541cb3c3105894")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned EagerTensor, 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 tensorflow as tf
import numpy as np

# INIT_ARGS: parameters for __SegFormerHeadTF.__init__
INIT_ARGS = {
    'in_dims': [32, 64, 128, 256],  # 4 different input dimensions for 4 feature levels
    'embed_dim': 128,
    'num_classes': 10
}

# Create dummy features with different spatial resolutions (typical for multi-scale features)
# Features are in BHWC format (TensorFlow convention)
# Using distinct spatial dimensions: 8x6, 4x3, 2x2, 1x1 for different scales
features = [
    tf.random.normal((2, 8, 6, 32)),   # B=2, H=8, W=6, C=32
    tf.random.normal((2, 4, 3, 64)),   # B=2, H=4, W=3, C=64
    tf.random.normal((2, 2, 2, 128)),  # B=2, H=2, W=2, C=128
    tf.random.normal((2, 1, 1, 256))   # B=2, H=1, W=1, C=256
]

# ARGS: parameters for __SegFormerHeadTF.call
ARGS = {
    'features': features
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
arg_to_varname Ran
ran; our contract draft was wrong, not the code
JoegameZhou/Segmenter_workers/src/configs/parser.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from Seongyeol-kim/FedWSQ, is pointer only (licence: NONE) · get_code("177a4abf40724f6e")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from Seongyeol-kim/FedWSQ, 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.

argv_to_vars Ran
ran on a synthesized input
JoegameZhou/Segmenter_workers/src/configs/parser.py
code served (permissive licence) · get_code("0355ab2cd3f47412")
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, 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 torch
import torch.nn as nn

torch.manual_seed(0)

# The function argv_to_vars takes an argv list and processes each argument
# It checks if each arg starts with '-' and if arg_to_varname(arg) != 'configs'
# Then it appends the varname to a list and returns it

# Minimal argv list with various argument formats
ARGS = {
    "argv": [
        "--learning_rate=0.001",
        "--batch_size=32",
        "-epochs=100",
        "--configs=path/to/config",  # This one should be filtered out
        "--hidden_dim=256",
        "-dropout=0.5",
        "not_a_flag",  # This doesn't start with '-' so it's ignored
        "--optimizer=adam",
    ]
}
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 list, ndim 1, dtype family float — a list 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
assignment Ran
ran on a synthesized input
JoegameZhou/Segmenter_workers/src/models/layers/weight_init.py
code served (permissive licence) · get_code("615dd6b5188585cd")
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 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

# Test case 1: scalar array assignment
arr1 = np.array(5.0)
num1 = 10.0

# Test case 2: 1D array assignment with scalar
arr2 = np.array([1.0, 2.0, 3.0, 4.0])
num2 = 7.0

# Test case 3: array assignment with numpy array
arr3 = np.array([1.0, 2.0, 3.0])
num3 = np.array([5.0, 6.0, 7.0])

# Test case 4: 2D array assignment with scalar
arr4 = np.array([[1.0, 2.0], [3.0, 4.0]])
num4 = 9.0

# Use the first test case for the main ARGS
ARGS = {
    "arr": np.array(5.0),
    "num": 10.0
}
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 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
attach_classifier_head Ran
ran on a synthesized input
alessiomora/unlearning_fl/unlearning_fl/model_utility.py
code served (permissive licence) · get_code("384604872a30dccd")
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.

import tensorflow as tf
import numpy as np

# Create input tensor - small shape for testing
# Using shape (2, 4) where 2 is batch size, 4 is feature dimension
input_shape = (None, 4)
inputs = tf.keras.Input(shape=(4,))

# Define arguments for the function
ARGS = {
    "inputs": inputs,
    "outputs": inputs,  # Start with the input as output before layers are applied
    "num_classes": 3,
    "classifier_hidden_layers": 2,
    "classifier_unit_pl": 8,
    "random_seed": 23
}
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 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
cal_eta Ran
ran; our contract draft was wrong, not the code
rulixiang/segformer-pytorch/dist_train.py
pointer only (licence: NONE) · get_code("68389231090ed0d4")
How it ran

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

calculate_file_sha256 Ran
ran; our contract draft was wrong, not the code
UAws/CV-3315-Is-All-You-Need/.dev/gather_models.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from zmhhmz/resfu, is pointer only (licence: NONE) · get_code("a669df2cd07c07bb")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from zmhhmz/resfu, 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.

calculate_gain Ran
ran, honoured the contract we drafted
JoegameZhou/Segmenter_workers/src/models/layers/weight_init.py
code served (permissive licence) · get_code("882f145326210430")
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 math

torch.manual_seed(0)

# The function calculate_gain takes two parameters:
# 1. nonlinearity: a string representing the nonlinearity function name
# 2. param: an optional parameter (used for leaky_relu negative_slope)

# Test with 'relu' nonlinearity and no param
ARGS = {
    'nonlinearity': 'relu',
    'param': None
}
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
cast_tuple Ran
ran, violated the contract we drafted
this paper's copy was not recorded; identical code first harvested from brsarah20/Alphafold2
pointer only · get_code("1f7c550e65142ef8")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for 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.

create_resnet18 Ran
ran on a synthesized input
alessiomora/unlearning_fl/unlearning_fl/models.py
code served (permissive licence) · get_code("3756f8840c9ca583")
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 ResNet18. 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 seeds for reproducibility
tf.random.set_seed(0)
np.random.seed(0)

# Create small sample data for testing
num_classes = 10
input_shape = (None, 32, 32, 3)
norm = 'group'
l2_weight_decay = 0.001
seed = 42

ARGS = {
    'num_classes': num_classes,
    'input_shape': input_shape,
    'norm': norm,
    'l2_weight_decay': l2_weight_decay,
    'seed': seed
}
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 ResNet18 — a ResNet18 output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet18 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
execute_now Ran
ran on a synthesized input
UAws/CV-3315-Is-All-You-Need/bridge/executor.py
code served (permissive licence) · get_code("55b8c7ef424d2298")
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 subprocess
from threading import Lock

def run_command(command):
    p = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    output, err = p.communicate()
    status = p.wait()
    if output is not None:
        output = output.decode('utf-8')
    if err is not None:
        err = err.decode('utf-8')
    return (output, err, status)

log_lock = Lock()

def log(level, msg, *args, **kwargs):
    log_lock.acquire(True)
    print('[' + level + ']', msg, end=' ')
    for arg in args:
        print(arg, end=' ')
    for k, w in kwargs:
        print('[', k, '=', w, ']', end=' ')
    print()
    log_lock.release()

def debug(msg, *args, **kwargs):
    log('DEBUG  ', msg, *args, **kwargs)

def execute_now(command):
    debug('run command:', command)
    out, err, status = run_command(command)
    debug('-> exit status:', status)
    debug('output:', out)
    debug('error:', err)
    return (out, err, status)


# Setup code to construct valid arguments for execute_now
ARGS = {
    'command': 'echo "hello world"'
}
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 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
expand_bbox Ran
ran, violated the contract we drafted
VikParuchuri/surya/surya/common/util.py
code served (permissive licence) · get_code("47e89f4fa09782a6")
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, 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 torch

torch.manual_seed(0)

# The function expand_bbox takes a bbox (bounding box) and an expansion_factor
# It indexes into bbox with [0], [1], [2], [3], so it needs a sequence-like object with at least 4 elements
# The function performs arithmetic operations on these elements

# Create a valid bounding box - a list of 4 numbers representing [x_min, y_min, x_max, y_max]
bbox = [10.0, 20.0, 100.0, 200.0]

# expansion_factor is a float parameter with default value 0.01
expansion_factor = 0.01

ARGS = {
    "bbox": bbox,
    "expansion_factor": expansion_factor
}
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 list, ndim 1, dtype family float — a list 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
find_pruneable_heads_and_indices Ran
ran; our contract draft was wrong, not the code
VikParuchuri/surya/surya/common/compat.py
code served (permissive licence) · get_code("cb0ea0c51176639b")
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 torch

torch.manual_seed(0)

ARGS = {
    "heads": [0, 2, 4],
    "n_heads": 8,
    "head_size": 64,
    "already_pruned_heads": {1, 3}
}
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 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_aligned_output_features_output_indices Ran
ran; our contract draft was wrong, not the code
VikParuchuri/surya/surya/common/compat.py
code served (permissive licence) · get_code("e03be3562fa16493")
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 torch
import torch.nn as nn
from typing import Optional, List, Union, Tuple

torch.manual_seed(0)

# Define stage_names - a list of stage identifiers
stage_names = ["layer1", "layer2", "layer3", "layer4"]

# Case 1: Both out_features and out_indices are None
# The function should default to the last stage
out_features_case1 = None
out_indices_case1 = None

# Case 2: Only out_indices is set
# out_features should be derived from out_indices
out_features_case2 = None
out_indices_case2 = [1, 3]

# Case 3: Only out_features is set
# out_indices should be derived from out_features
out_features_case3 = ["layer1", "layer3"]
out_indices_case3 = None

# Case 4: Both out_features and out_indices are set and aligned
# They should match and be in stage order
out_features_case4 = ["layer2", "layer4"]
out_indices_case4 = [1, 3]

# Use Case 1 for the main ARGS
ARGS = {
    "out_features": out_features_case1,
    "out_indices": out_indices_case1,
    "stage_names": stage_names,
}
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 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
get_final_iter Ran
ran, honoured the contract we drafted
UAws/CV-3315-Is-All-You-Need/.dev/gather_models.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from zmhhmz/resfu, is pointer only (licence: NONE) · get_code("88d68650d669bb11")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from zmhhmz/resfu, 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.

get_model_name Ran
ran; our contract draft was wrong, not the code
VikParuchuri/surya/surya/common/s3.py
code served (permissive licence) · get_code("072e0940fa122b3f")
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

torch.manual_seed(0)

ARGS = {
    "pretrained_model_name_or_path": "openai/gpt2"
}
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
get_norm_layer Ran
ran on a synthesized input
alessiomora/unlearning_fl/unlearning_fl/models.py
code served (permissive licence) · get_code("4581a201b7093062")
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 BatchNormalization. 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

# Define ARGS with all parameters for get_norm_layer
ARGS = {
    'norm': 'batch',
    'channel_axis': -1
}

# Test with different norm types to verify the function works
test_cases = [
    {'norm': 'batch', 'channel_axis': -1},
    {'norm': 'layer', 'channel_axis': -1},
    {'norm': 'group', 'channel_axis': -1},
]

# Verify each test case produces a valid layer
for test_args in test_cases:
    layer = tf.keras.layers.Layer.from_config(
        tf.keras.layers.Layer.get_config(
            tf.keras.layers.BatchNormalization(axis=test_args['channel_axis'], momentum=0.997)
        )
    ) if test_args['norm'] == 'batch' else None

ARGS = {
    'norm': 'batch',
    'channel_axis': -1
}
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 BatchNormalization — a BatchNormalization output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a BatchNormalization 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_normalization_fn Ran
ran on a synthesized input
alessiomora/unlearning_fl/unlearning_fl/dataset.py
code served (permissive licence) · get_code("247223d98d751eff")
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 tensorflow as tf

ARGS = {
    'model_name': 'mit-b0',
    'dataset': 'cifar100'
}
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 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
is_blank_region Ran
ran; our contract draft was wrong, not the code
VikParuchuri/surya/surya/common/blank.py
code served (permissive licence) · get_code("049c52930f551191")
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 bool, 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
from PIL import Image

# Create a test image that is mostly blank (white)
blank_image = Image.new('RGB', (10, 10), color=(250, 250, 250))

# Create a test image with uniform color (low std dev across channels)
uniform_image = Image.new('RGB', (10, 10), color=(100, 105, 102))

# Create a test image with varied color (high std dev)
varied_array = np.random.randint(0, 256, (10, 10, 3), dtype=np.uint8)
varied_image = Image.fromarray(varied_array)

# Use the blank image as the primary test case
test_image = blank_image

ARGS = {
    'image': test_image,
    'white_threshold': 245,
    'blank_pixel_fraction': 0.99,
    'uniform_color_std': 8.0,
}
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 bool, 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
join_urls Ran
ran; our contract draft was wrong, not the code
VikParuchuri/surya/surya/common/s3.py
code served (permissive licence) · get_code("e27103cbb1fca337")
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

ARGS = {
    'url1': 'https://example.com/path/',
    'url2': '/subpath/resource'
}
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
kaiming_uniform Ran
ran on a synthesized input
JoegameZhou/Segmenter_workers/src/models/layers/weight_init.py
code served (permissive licence) · get_code("039303a649214f32")
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 (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 math
import numpy as np

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

# Create a small numpy array with shape (4, 3) to represent a weight tensor
# This will be used to test the kaiming_uniform function
# The function expects an array with at least 2 dimensions
arr = np.empty((4, 3))

ARGS = {
    'arr': arr,
    'a': 0.01,
    'mode': 'fan_in',
    'nonlinearity': 'leaky_relu'
}
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 (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
load_client_datasets_from_files Ran
ran on a synthesized input
alessiomora/unlearning_fl/unlearning_fl/dataset.py
code served (permissive licence) · get_code("7259ad6db5a66899")
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 _PrefetchDataset. 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 tensorflow as tf
from unittest.mock import Mock, patch

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

# Create a mock dataset that will be returned by tf.data.Dataset.load
def create_mock_dataset():
    """Create a small mock dataset with image-label pairs."""
    images = tf.random.uniform((10, 224, 224, 3), maxval=256, dtype=tf.int32)
    labels = tf.random.uniform((10,), maxval=100, dtype=tf.int32)
    dataset = tf.data.Dataset.from_tensor_slices((images, labels))
    return dataset

# Mock tf.data.Dataset.load to return our mock dataset
original_load = tf.data.Dataset.load

def mock_dataset_load(*args, **kwargs):
    return create_mock_dataset()

tf.data.Dataset.load = mock_dataset_load

# Define the arguments dictionary
ARGS = {
    'dataset': 'cifar100',
    'sampled_client': 0,
    'batch_size': 2,
    'total_clients': 100,
    'alpha': 0.3,
    'split': 'train',
    'model_name': 'mit-b0',
    'is_training': True,
    'seed': 42
}
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 _PrefetchDataset — a _PrefetchDataset output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a _PrefetchDataset 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
near_white_fraction Ran
ran; our contract draft was wrong, not the code
VikParuchuri/surya/surya/common/blank.py
code served (permissive licence) · get_code("8acf036b36a65cd2")
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
from PIL import Image

# Create a test image with mostly white pixels
width, height = 10, 8
# Create RGB array with mostly white pixels (all channels >= 245)
arr = np.full((height, width, 3), 250, dtype=np.uint8)
# Add some non-white pixels to make it interesting
arr[0:2, 0:2] = [100, 150, 200]
image = Image.fromarray(arr, mode='RGB')

ARGS = {
    'image': image,
    'white_threshold': 245
}
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 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
parse_model_inputs Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
DavidLandup0/deepvision/deepvision/models/segmentation/segformer/segformer.py
code served (permissive licence) · get_code("49d6368d9a869361")
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) and returned KerasTensor. 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
from tensorflow import keras
from tensorflow.keras import layers
import torch

# Test case 1: tensorflow backend with no input_tensor
backend_tf = 'tensorflow'
input_shape_1 = (4, 3)
input_tensor_none = None

# Test case 2: tensorflow backend with keras tensor
input_tensor_keras = layers.Input(shape=(4, 3))

# Test case 3: pytorch backend with input_tensor
torch.manual_seed(0)
backend_pytorch = 'pytorch'
input_tensor_pytorch = torch.randn(2, 4, 3)

# We'll use the first test case as the primary ARGS
ARGS = {
    'backend': 'tensorflow',
    'input_shape': (4, 3),
    'input_tensor': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
tensorflow, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type KerasTensor — a KerasTensor 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
pil_loader Ran
ran, honoured the contract we drafted
alessiomora/unlearning_fl/unlearning_fl/centralized_aircrafts.py
code served (permissive licence) · get_code("d2ab609def2d3e40")
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 tempfile
import os
from PIL import Image

# Create a temporary directory and a valid image file
temp_dir = tempfile.mkdtemp()
temp_image_path = os.path.join(temp_dir, "test_image.jpg")

# Create a small RGB image and save it
img = Image.new('RGB', (4, 3), color=(255, 0, 0))
img.save(temp_image_path)

ARGS = {
    "path": temp_image_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL — 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
pil_loader Ran
ran on a synthesized input
alessiomora/unlearning_fl/unlearning_fl/dataset_preparation.py
code served (permissive licence) · get_code("4fb2c2bdfa4534bd")
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 tempfile
import os
from PIL import Image

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

# Create a small test image and save it
test_img = Image.new('RGB', (64, 48), color='red')
test_img.save(test_image_path)

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
PIL — 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
process_checkpoint Ran
ran; our contract draft was wrong, not the code
UAws/CV-3315-Is-All-You-Need/.dev/gather_models.py
code served (permissive licence) · get_code("aa74cd62302ed7c8")
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 tempfile
import os

torch.manual_seed(0)

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

# Create a dummy checkpoint file to use as input
dummy_checkpoint = {
    'model_state_dict': {'layer1.weight': torch.randn(4, 3)},
    'optimizer': {'state': {}},
    'epoch': 5
}

in_file = os.path.join(temp_dir, 'checkpoint_input.pth')
torch.save(dummy_checkpoint, in_file)

out_file = os.path.join(temp_dir, 'checkpoint_output.pth')

ARGS = {
    'in_file': in_file,
    'out_file': out_file
}
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
process_model_info Ran
ran; our contract draft was wrong, not the code
UAws/CV-3315-Is-All-You-Need/.dev/generate_benchmark_evaluation_script.py
code served (permissive licence) · get_code("39403bf2697d1720")
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 os.path as osp

# Construct model_info dict with required keys
model_info = {
    'config': '/path/to/config_file.py  ',  # with whitespace to test .strip()
    'checkpoint': '/path/to/checkpoint.pth  ',  # with whitespace to test .strip()
    'eval': ['metric1', 'metric2']  # list of evaluation metrics
}

# Construct work_dir
work_dir = '/tmp/work'

# Define ARGS mapping all parameters
ARGS = {
    'model_info': model_info,
    'work_dir': work_dir
}
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 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
read_fedmlb_distribution Ran
ran on a synthesized input
alessiomora/unlearning_fl/unlearning_fl/dataset_preparation.py
code served (permissive licence) · get_code("5cb938e6605fcde4")
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, 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 ast

# Create a temporary directory structure to hold test data
temp_dir = tempfile.mkdtemp()
dataset_dir = os.path.join(temp_dir, 'fed_vit_non_iid', 'client_data', 'CIFAR10', 'balanced')
os.makedirs(dataset_dir, exist_ok=True)

# Create a sample distribution file
sample_distribution = [
    [0.1, 0.2, 0.3, 0.4],
    [0.25, 0.25, 0.25, 0.25],
    [0.5, 0.2, 0.2, 0.1],
    [0.15, 0.35, 0.25, 0.25]
]

# Write the file with alpha=0.5
alpha = 0.5
alpha_str = 'dirichlet' + str(round(alpha, 1))
file_path = os.path.join(dataset_dir, alpha_str + '_clients4.txt')
with open(file_path, 'w') as f:
    f.write(str(sample_distribution))

# Change to temp directory so relative path works
original_cwd = os.getcwd()
os.chdir(temp_dir)

ARGS = {
    'dataset': 'CIFAR10',
    'total_clients': 4,
    'alpha': 0.5,
    'data_folder': 'client_data'
}
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 list, ndim 2, dtype family float — a list 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

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

Also present in other papers' code

Of 86 samples lifted from this paper's linked repositories, 86 carry a function identity and 0 do not. Of the 85 distinct functions with an identity, 30 are also present in other papers whose code we hold (12 with at least one paper dated earlier, 5 the same month, 28 later) and 55 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
exists 486 other papers
43 dated earlier, 3 the same month, 438 later, 2 undated · 78 only as an assembly brick
1603.08155 (2016-03)
Perceptual Losses for Real-Time Style Transfer and Super-Resolution
1611.07004 (2016-11)
Image-to-Image Translation with Conditional Adversarial Networks
1804.04637 (2018-04)
EMBER: An Open Dataset for Training Static PE Malware Machine Learning Models
and 483 more not named here
pil_loader 28 other papers
14 dated earlier, 14 later
1702.00758 (2017-02)
HashNet: Deep Learning to Hash by Continuation
1805.07932 (2018-05)
Bilinear Attention Networks
1807.06587 (2018-07)
Deep Exemplar-based Colorization
and 25 more not named here
get_final_iter 13 other papers
1 dated earlier, 1 the same month, 11 later
2103.14030 (2021-03)
Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
2105.05409 (2021-05)
A Large-Scale Benchmark for Food Image Segmentation
2106.04263 (2021-06)
On the Connection between Local Attention and Dynamic Depth-wise Convolution
and 10 more not named here
arg_to_varname 9 other papers
3 dated earlier, 6 later
1512.03385 (2015-12)
Deep Residual Learning for Image Recognition
1911.13299 (2019-11)
What's Hidden in a Randomly Weighted Neural Network?
2104.00298 (2021-04)
EfficientNetV2: Smaller Models and Faster Training
and 6 more not named here
calculate_file_sha256 9 other papers
9 later
2303.11633 (2023-03)
Learning Context-Aware Classifier for Semantic Segmentation
2304.13428 (2023-04)
Compensation Learning in Semantic Segmentation
2309.14303 (2023-09)
Dataset Diffusion: Diffusion-based Synthetic Dataset Generation for Pixel-Level Semantic Segmentation
and 6 more not named here
trim_preceding_hyphens 9 other papers
3 dated earlier, 6 later
1512.03385 (2015-12)
Deep Residual Learning for Image Recognition
1911.13299 (2019-11)
What's Hidden in a Randomly Weighted Neural Network?
2104.00298 (2021-04)
EfficientNetV2: Smaller Models and Faster Training
and 6 more not named here
cast_tuple
brick of this paper's assembly: helper
7 other papers
1 dated earlier, 1 the same month, 5 later · 1 only as an assembly brick
2102.13419 (2021-02)
Iterative SE(3)-Transformers
2105.12723 (2021-05)
Nested Hierarchical Transformer: Towards Accurate, Data-Efficient and Interpretable Visual Understanding
2111.09883 (2021-11)
Swin Transformer V2: Scaling Up Capacity and Resolution
and 4 more not named here
DepthwiseConv2D
brick of this paper's assembly: helper
5 other papers
2 dated earlier, 1 the same month, 2 later
2102.12122 (2021-02)
Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
2103.14030 (2021-03)
Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
2105.01601 (2021-05)
MLP-Mixer: An all-MLP Architecture for Vision
and 2 more not named here
DropPath
brick of this paper's assembly: helper
5 other papers
3 dated earlier, 2 later · 1 only as an assembly brick
1603.09382 (2016-03)
Deep Networks with Stochastic Depth
2102.12122 (2021-02)
Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
2103.14030 (2021-03)
Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
and 2 more not named here
TransformerMLP
brick of this paper's assembly: helper
4 other papers
2 dated earlier, 1 the same month, 1 later
2102.12122 (2021-02)
Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
2103.14030 (2021-03)
Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
2105.01601 (2021-05)
MLP-Mixer: An all-MLP Architecture for Vision
and 1 more not named here
check_url 4 other papers
4 later
2310.05590 (2023-10)
Perceptual Artifacts Localization for Image Synthesis Tasks
2404.01705 (2024-04)
Samba: Semantic Segmentation of Remotely Sensed Images with State Space Model
2405.06228 (2024-05)
Context-Guided Spatial Feature Reconstruction for Efficient Semantic Segmentation
and 1 more not named here
calculate_gain 3 other papers
2 dated earlier, 1 later
1804.02767 (2018-04)
YOLOv3: An Incremental Improvement
2104.00298 (2021-04)
EfficientNetV2: Smaller Models and Faster Training
2107.08430 (2021-07)
YOLOX: Exceeding YOLO Series in 2021
process_checkpoint 2 other papers
2 later
2303.11633 (2023-03)
Learning Context-Aware Classifier for Semantic Segmentation
2405.06228 (2024-05)
Context-Guided Spatial Feature Reconstruction for Efficient Semantic Segmentation
process_model_info 2 other papers
2 later
2310.05590 (2023-10)
Perceptual Artifacts Localization for Image Synthesis Tasks
2405.06228 (2024-05)
Context-Guided Spatial Feature Reconstruction for Efficient Semantic Segmentation
DsConv2d
brick of this paper's assembly: model
1 other paper
1 later · 1 only as an assembly brick
2601.18260 (2026-01)
Depth to Anatomy: Organ Localization from Depth Images for Automated Patient Table Positioning in Radiology Workflow
EfficientSelfAttention
brick of this paper's assembly: model
1 other paper
1 later · 1 only as an assembly brick
2601.18260 (2026-01)
Depth to Anatomy: Organ Localization from Depth Images for Automated Patient Table Positioning in Radiology Workflow
MiT
brick of this paper's assembly: model
1 other paper
1 later · 1 only as an assembly brick
2601.18260 (2026-01)
Depth to Anatomy: Organ Localization from Depth Images for Automated Patient Table Positioning in Radiology Workflow
MixFeedForward
brick of this paper's assembly: model
1 other paper
1 later · 1 only as an assembly brick
2601.18260 (2026-01)
Depth to Anatomy: Organ Localization from Depth Images for Automated Patient Table Positioning in Radiology Workflow
PreNorm
brick of this paper's assembly: model
1 other paper
1 later · 1 only as an assembly brick
2601.18260 (2026-01)
Depth to Anatomy: Organ Localization from Depth Images for Automated Patient Table Positioning in Radiology Workflow
assignment 1 other paper
1 dated earlier
2104.00298 (2021-04)
EfficientNetV2: Smaller Models and Faster Training

Shown: the 20 functions present in the most other papers. 10 more shared functions are not listed here.

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

Repositories linked to this paper

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

Abstract

We present SegFormer, a simple, efficient yet powerful semantic segmentation framework which unifies Transformers with lightweight multilayer perceptron (MLP) decoders. SegFormer has two appealing features: 1) SegFormer comprises a novel hierarchically structured Transformer encoder which outputs multiscale features. It does not need positional encoding, thereby avoiding the interpolation of positional codes which leads to decreased performance when the testing resolution differs from training. 2) SegFormer avoids complex decoders. The proposed MLP decoder aggregates information from different layers, and thus combining both local attention and global attention to render powerful representations. We show that this simple and lightweight design is the key to efficient segmentation on Transformers. We scale our approach up to obtain a series of models from SegFormer-B0 to SegFormer-B5, reaching significantly better performance and efficiency than previous counterparts. For example, SegFormer-B4 achieves 50.3% mIoU on ADE20K with 64M parameters, being 5× smaller and 2.2% better than the previous best method. Our best model, SegFormer-B5, achieves 84.0% mIoU on Cityscapes validation set and shows excellent zero-shot robustness on Cityscapes-C.

For agents

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

get_harvested_code_for_paper("2105.15203")
get_code_for_paper("2105.15203")
have("2105.15203")

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

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

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

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

Connect an agent — have() is free.