SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2201.04676 · ICLR · 2022

UniFormer: Unified Transformer for Efficient Spatiotemporal Representation Learning

Hongsheng Li, Yu Qiao, Peng Gao, Kunchang Li, Yali Wang, Guanglu Song, Yu Liu

arXiv · PDF · Open in the Atlas

Code that ran

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

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2201.04676.json · badge: /api/ran/2201.04676.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
towhee-io/towhee community
Papers with Code archive
23 ran · 7 no recorded run
sense-x/uniformer community
Papers with Code archive
4 ran · 1 no recorded run
lucidrains/uniformer-pytorch reimplementation (classifier label)
classifier basis: classifier_2025
0 ran · 2 no recorded run
FunctionStatusWhere it lives
CBlock Ran
ran on a synthesized input · constructed an object; no result was computed
towhee-io/towhee/towhee/models/uniformer/uniformer.py
code served (permissive licence) · get_code("f8b18bc5e8ba3ac5")
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, CBlock: 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 helper functions and classes used by CBlock
def conv_1x1x1(inp, oup, groups=1):
    return nn.Conv3d(inp, oup, (1, 1, 1), (1, 1, 1), (0, 0, 0), groups=groups)

def conv_3x3x3(inp, oup, groups=1):
    return nn.Conv3d(inp, oup, (3, 3, 3), (1, 1, 1), (1, 1, 1), groups=groups)

def conv_5x5x5(inp, oup, groups=1):
    return nn.Conv3d(inp, oup, (5, 5, 5), (1, 1, 1), (2, 2, 2), groups=groups)

def bn_3d(dim):
    return nn.BatchNorm3d(dim)

def drop_path(x, drop_prob: float=0.0, training: bool=False):
    if drop_prob == 0.0 or not training:
        return x
    keep_prob = 1 - drop_prob
    shape = (x.shape[0],) + (1,) * (x.ndim - 1)
    random_tensor = keep_prob + torch.rand(shape, dtype=x.dtype, device=x.device)
    random_tensor.floor_()
    output = x.div(keep_prob) * random_tensor
    return output

class DropPath(nn.Module):
    def __init__(self, drop_prob=None):
        super().__init__()
        self.drop_prob = drop_prob

    def forward(self, x):
        return drop_path(x, self.drop_prob, self.training)

class CMlp(nn.Module):
    def __init__(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.0):
        super().__init__()
        out_features = out_features or in_features
        hidden_features = hidden_features or in_features
        self.fc1 = conv_1x1x1(in_features, hidden_features)
        self.act = act_layer()
        self.fc2 = conv_1x1x1(hidden_features, out_features)
        self.drop = nn.Dropout(drop)

    def forward(self, x):
        x = self.fc1(x)
        x = self.act(x)
        x = self.drop(x)
        x = self.fc2(x)
        x = self.drop(x)
        return x

class CBlock(nn.Module):
    def __init__(self, dim, num_heads, mlp_ratio=4.0, qkv_bias=False, qk_scale=None, drop=0.0, attn_drop=0.0, drop_path=0.0, act_layer=nn.GELU, norm_layer=nn.LayerNorm):
        super().__init__()
        self.pos_embed = conv_3x3x3(dim, dim, groups=dim)
        self.norm1 = bn_3d(dim)
        self.conv1 = conv_1x1x1(dim, dim, 1)
        self.conv2 = conv_1x1x1(dim, dim, 1)
        self.attn = conv_5x5x5(dim, dim, groups=dim)
        self.drop_path = DropPath(drop_path) if drop_path > 0.0 else nn.Identity()
        self.norm2 = bn_3d(dim)
        mlp_hidden_dim = int(dim * mlp_ratio)
        self.mlp = CMlp(in_features=dim, hidden_features=mlp_hidden_dim, act_layer=act_layer, drop=drop)

    def forward(self, x):
        x = x + self.pos_embed(x)
        x = x + self.drop_path(self.conv2(self.attn(self.conv1(self.norm1(x)))))
        x = x + self.drop_path(self.mlp(self.norm2(x)))
        return x

ARGS = {
    "dim": 4,
    "num_heads": 2,
    "mlp_ratio": 4.0,
    "qkv_bias": False,
    "qk_scale": None,
    "drop": 0.1,
    "attn_drop": 0.1,
    "drop_path": 0.1,
    "act_layer": nn.GELU,
    "norm_layer": nn.LayerNorm,
}
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 CBlock — 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 CBlock 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
CBlock Ran
ran on a synthesized input · constructed an object; no result was computed
sense-x/uniformer/image_classification/models/uniformer.py
code served (permissive licence) · get_code("e8faab56f5f8df9b")
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, CBlock: 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 timm.models.layers import DropPath

torch.manual_seed(0)

ARGS = {
    "dim": 4,
    "num_heads": 2,
    "mlp_ratio": 4.0,
    "qkv_bias": False,
    "qk_scale": None,
    "drop": 0.0,
    "attn_drop": 0.0,
    "drop_path": 0.0,
    "act_layer": nn.GELU,
    "norm_layer": nn.LayerNorm,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
timm, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type CBlock — 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 CBlock 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
CMlp Ran
ran on a synthesized input · constructed an object; no result was computed
towhee-io/towhee/towhee/models/uniformer/uniformer.py
code served (permissive licence) · get_code("3fca321b162e5063")
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, CMlp: 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 = {
    "in_features": 4,
    "hidden_features": 8,
    "out_features": 4,
    "act_layer": nn.GELU,
    "drop": 0.1,
}
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 CMlp — 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 CMlp 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 · constructed an object; no result was computed
towhee-io/towhee/towhee/models/uniformer/uniformer.py
code served (permissive licence) · get_code("8f059bf3db11537b")
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 torch
from torch import nn

torch.manual_seed(0)

# DropPath.__init__ takes drop_prob parameter
# The forward method calls drop_path(x, self.drop_prob, self.training)
# So we need to provide a drop_prob value

# Create a small tensor for testing
x = torch.randn(2, 4)

# Define ARGS dict with all parameters for DropPath.__init__
ARGS = {
    "drop_prob": 0.5
}
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 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
Dropout Ran
ran on a synthesized input · constructed an object; no result was computed
towhee-io/towhee/towhee/models/uniformer/uniformer.py
code served (permissive licence) · get_code("6b2146395f61d804")
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, Dropout: 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)

# Dropout inherits from nn.Dropout and RelProp
# nn.Dropout.__init__ signature is: __init__(self, p=0.5, inplace=False)
# We need to provide valid arguments for instantiation

# The Dropout class inherits from both nn.Dropout and RelProp
# RelProp.__init__ takes only self
# nn.Dropout.__init__ takes p (dropout probability) and inplace

# Looking at how Dropout is used:
# - It's instantiated as a module
# - forward_hook will be called on forward pass
# - gradprop method exists and uses torch.autograd.grad
# - relprop method exists

# Valid arguments for Dropout constructor:
p = 0.5  # dropout probability between 0 and 1
inplace = False  # whether to do inplace dropout

ARGS = {
    'p': p,
    'inplace': inplace
}
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 Dropout — 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 Dropout 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
Einsum Ran
ran on a synthesized input · constructed an object; no result was computed
towhee-io/towhee/towhee/models/uniformer/uniformer.py
code served (permissive licence) · get_code("d2f31546ef368292")
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, Einsum: 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 = {
    "equation": "ij,jk->ik"
}
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 Einsum — 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 Einsum 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
GELU Ran
ran on a synthesized input · constructed an object; no result was computed
towhee-io/towhee/towhee/models/uniformer/uniformer.py
code served (permissive licence) · get_code("d4114dbf5943332c")
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, GELU: 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)

class GELU(nn.GELU):
    pass

# GELU inherits from nn.GELU which is an nn.Module
# nn.GELU.__init__ takes optional parameters: approximate (str, default='none')
# The actual GELU class in the provided code inherits from both nn.GELU and RelProp
# RelProp.__init__ takes no parameters (besides self)
# 
# nn.GELU can be instantiated with:
# - approximate: 'none' or 'tanh' (optional, default is 'none')
#
# Since GELU is an nn.Module (specifically nn.GELU), it doesn't have special
# required parameters beyond what nn.GELU provides (which are optional)

gelu_instance = GELU(approximate='none')

# For testing purposes, we can create a small input tensor
# GELU is a layer that processes input, so we need to test it works
input_tensor = torch.randn(2, 4, requires_grad=True)

ARGS = {
    # GELU inherits from nn.GELU which has approximate as optional parameter
    # We pass 'none' as the approximate strategy
}
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 GELU — 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 GELU 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
Linear Ran
ran on a synthesized input · constructed an object; no result was computed
towhee-io/towhee/towhee/models/uniformer/uniformer.py
code served (permissive licence) · get_code("82f963c4eb1876d4")
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, Linear: 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
import torch.nn.functional as F

torch.manual_seed(0)

# The Linear class inherits from nn.Linear and RelProp
# nn.Linear.__init__ signature: Linear(in_features, out_features, bias=True, device=None, dtype=None)
# We need to construct arguments for instantiating and using a Linear layer

# Create a Linear layer instance
in_features = 4
out_features = 3
linear_layer = nn.Linear(in_features=in_features, out_features=out_features, bias=True)

# Create input tensor for forward pass (batch_size=2, in_features=4)
x = torch.randn(2, 4, requires_grad=True)

# Create relevance tensor for relprop (same shape as output: batch_size=2, out_features=3)
r = torch.randn(2, 3)

# Alpha parameter for relprop
alpha = 2.0

# Forward pass to set up the module's internal state (x, y attributes via forward_hook)
with torch.no_grad():
    output = linear_layer(x)

# Now we can call relprop
# The ARGS dict should contain all parameters needed to construct and use Linear
ARGS = {
    "in_features": in_features,
    "out_features": out_features,
    "bias": True,
    "device": None,
    "dtype": 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 Linear — 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 Linear 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
Mlp Ran
ran on a synthesized input · constructed an object; no result was computed
towhee-io/towhee/towhee/models/uniformer/uniformer.py
code served (permissive licence) · get_code("865f8893e93aa461")
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
from torch import nn

torch.manual_seed(0)

ARGS = {
    'in_features': 4,
    'hidden_features': 6,
    'out_features': 8,
    'act_layer': nn.GELU,
    'drop': 0.1,
}
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
PatchEmbed Ran
ran on a synthesized input · constructed an object; no result was computed
towhee-io/towhee/towhee/models/uniformer/uniformer.py
code served (permissive licence) · get_code("e23cb083b2438d3d")
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, PatchEmbed: 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 = {
    'img_size': 224,
    'patch_size': 16,
    'in_chans': 3,
    'embed_dim': 768,
    'std': False,
}
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 PatchEmbed — 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 PatchEmbed 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
SABlock Ran
ran on a synthesized input · constructed an object; no result was computed
sense-x/uniformer/image_classification/models/uniformer.py
code served (permissive licence) · get_code("8a8dcc08ab9bfa65")
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, SABlock: 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 timm.models.layers import DropPath

torch.manual_seed(0)

ARGS = {
    "dim": 4,
    "num_heads": 2,
    "mlp_ratio": 4.0,
    "qkv_bias": False,
    "qk_scale": None,
    "drop": 0.1,
    "attn_drop": 0.1,
    "drop_path": 0.0,
    "act_layer": nn.GELU,
    "norm_layer": nn.LayerNorm,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
timm, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SABlock — 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 SABlock 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
Softmax Ran
ran on a synthesized input · constructed an object; no result was computed
towhee-io/towhee/towhee/models/uniformer/uniformer.py
code served (permissive licence) · get_code("15c57dc641cf3d74")
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, Softmax: 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": 1,
}
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 Softmax — 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 Softmax 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
SpeicalPatchEmbed Ran
ran on a synthesized input
towhee-io/towhee/towhee/models/uniformer/uniformer.py
code served (permissive licence) · get_code("68e7dd5cd494241b")
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 5, 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 torch import nn
from typing import Callable
from itertools import repeat
import collections.abc

def _ntuple(n: int) -> Callable:
    def parse(x):
        if isinstance(x, collections.abc.Iterable):
            return x
        return tuple(repeat(x, n))
    return parse

def conv_3xnxn(inp, oup, kernel_size=3, stride=3, groups=1):
    return nn.Conv3d(inp, oup, (3, kernel_size, kernel_size), (2, stride, stride), (1, 0, 0), groups=groups)

to_2tuple = _ntuple(2)

class SpeicalPatchEmbed(nn.Module):
    """
    Image to Patch Embedding
    """

    def __init__(self, img_size=224, patch_size=16, in_chans=3, embed_dim=768):
        super().__init__()
        img_size = to_2tuple(img_size)
        patch_size = to_2tuple(patch_size)
        num_patches = img_size[1] // patch_size[1] * (img_size[0] // patch_size[0])
        self.img_size = img_size
        self.patch_size = patch_size
        self.num_patches = num_patches
        self.norm = nn.LayerNorm(embed_dim)
        self.proj = conv_3xnxn(in_chans, embed_dim, kernel_size=patch_size[0], stride=patch_size[0])

    def forward(self, x):
        b, _, t, h, w = x.shape
        x = self.proj(x)
        b, _, t, h, w = x.shape
        x = x.flatten(2).transpose(1, 2)
        x = self.norm(x)
        x = x.reshape(b, t, h, w, -1).permute(0, 4, 1, 2, 3).contiguous()
        return x

INIT_ARGS = {
    'img_size': 32,
    'patch_size': 4,
    'in_chans': 3,
    'embed_dim': 8,
}

ARGS = {
    'x': torch.randn(2, 3, 3, 32, 32),
}

if __name__ == '__main__':
    model = SpeicalPatchEmbed(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output dtype: {output.dtype}")
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 5, 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)
_no_grad_trunc_normal_ Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
towhee-io/towhee/towhee/models/uniformer/uniformer.py
code served (permissive licence) · get_code("607038475fdc388b")
How it ran

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

import torch
import math

torch.manual_seed(0)

# Create a small tensor to be initialized
tensor = torch.empty(2, 4)

# Define parameters for truncated normal distribution
mean = 0.0
std = 1.0
a = -2.0  # lower bound
b = 2.0   # upper bound

ARGS = {
    'tensor': tensor,
    'mean': mean,
    'std': std,
    'a': a,
    'b': b,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_ntuple Ran
ran; our contract draft was wrong, not the code
towhee-io/towhee/towhee/models/uniformer/uniformer.py
code served (permissive licence) · get_code("2f3cf06bc7cb9815")
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 torch
import numpy as np
from typing import Callable
from itertools import repeat
import collections.abc

torch.manual_seed(0)

def _ntuple(n: int) -> Callable:

    def parse(x):
        if isinstance(x, collections.abc.Iterable):
            return x
        return tuple(repeat(x, n))
    return parse

# The function _ntuple takes one parameter: n (an int)
# It returns a parse function that can handle both iterables and scalars
# Testing with various values of n

ARGS = {
    "n": 3
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
bn_3d Ran
ran; our contract draft was wrong, not the code
towhee-io/towhee/towhee/models/uniformer/uniformer.py
code served (permissive licence) · get_code("5e851f59c9824316")
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 BatchNorm3d. 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": 4
}
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 BatchNorm3d — a BatchNorm3d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a BatchNorm3d 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
conv_1x1x1 Ran
ran; our contract draft was wrong, not the code
towhee-io/towhee/towhee/models/uniformer/uniformer.py
code served (permissive licence) · get_code("84e3e49d2ae685c9")
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 Conv3d. 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 = {
    "inp": 3,
    "oup": 16,
    "groups": 1
}
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 Conv3d — a Conv3d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv3d 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
conv_1xnxn Ran
ran; our contract draft was wrong, not the code
towhee-io/towhee/towhee/models/uniformer/uniformer.py
code served (permissive licence) · get_code("0120a7f1a1e50907")
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 Conv3d. 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 = {
    'inp': 3,
    'oup': 64,
    'kernel_size': 3,
    'stride': 3,
    'groups': 1,
}
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 Conv3d — a Conv3d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv3d 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
conv_3x3x3 Ran
ran; our contract draft was wrong, not the code
towhee-io/towhee/towhee/models/uniformer/uniformer.py
code served (permissive licence) · get_code("b7ed0955d5e0c6f0")
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 Conv3d. 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)

# The function conv_3x3x3 takes inp, oup, and groups as parameters
# inp: number of input channels
# oup: number of output channels
# groups: number of groups for grouped convolution (default 1)

ARGS = {
    "inp": 3,
    "oup": 16,
    "groups": 1
}
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 Conv3d — a Conv3d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv3d 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
conv_3xnxn Ran
ran; our contract draft was wrong, not the code
towhee-io/towhee/towhee/models/uniformer/uniformer.py
code served (permissive licence) · get_code("813d5682c2f6b672")
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 Conv3d. 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)

# The function conv_3xnxn takes parameters: inp, oup, kernel_size, stride, groups
# It creates a Conv3d layer, so inp and oup should be integers (channel counts)
# kernel_size, stride, and groups should also be integers

ARGS = {
    'inp': 3,           # input channels
    'oup': 16,          # output channels
    'kernel_size': 3,   # kernel size for spatial dimensions
    'stride': 3,        # stride for spatial dimensions
    'groups': 1         # groups for grouped convolution
}
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 Conv3d — a Conv3d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv3d 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
conv_3xnxn_std Ran
ran; our contract draft was wrong, not the code
towhee-io/towhee/towhee/models/uniformer/uniformer.py
code served (permissive licence) · get_code("7e0fda53f432a9bd")
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 Conv3d. 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 = {
    'inp': 3,
    'oup': 4,
    'kernel_size': 3,
    'stride': 3,
    'groups': 1,
}
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 Conv3d — a Conv3d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv3d 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
conv_5x5x5 Ran
ran; our contract draft was wrong, not the code
towhee-io/towhee/towhee/models/uniformer/uniformer.py
code served (permissive licence) · get_code("b2472041187c554f")
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 Conv3d. 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)

# The function conv_5x5x5 takes inp (input channels), oup (output channels), 
# and groups as parameters, and returns an nn.Conv3d module.
# We need to provide valid integer values for these parameters.

inp = 3      # input channels
oup = 16     # output channels
groups = 1   # groups parameter (default is 1)

ARGS = {
    'inp': inp,
    'oup': oup,
    'groups': groups
}
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 Conv3d — a Conv3d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv3d 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
drop_path Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
towhee-io/towhee/towhee/models/uniformer/uniformer.py
code served (permissive licence) · get_code("39eace7e2822504f")
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 Tensor, ndim 4, dtype family float, shape (2, 4, 3, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create a small tensor for testing
# Shape: (batch_size=2, channels=4, height=3, width=3) - 4D tensor
x = torch.randn(2, 4, 3, 3, dtype=torch.float32)

ARGS = {
    "x": x,
    "drop_prob": 0.5,
    "training": True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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, 4, 3, 3) — shape (2, 4, 3, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
head_embedding Ran
ran on a synthesized input · constructed an object; no result was computed
sense-x/uniformer/image_classification/models/uniformer.py
code served (permissive licence) · get_code("0c3842c98c1ef897")
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, head_embedding: 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)

# The head_embedding module takes in_channels and out_channels as parameters
# It uses them to construct Conv2d and BatchNorm2d layers
# The forward method expects an input tensor x

# Create a small input tensor for testing
# Shape: (batch_size, in_channels, height, width)
# Using batch=2, in_channels=3, height=16, width=16 (small spatial dims)
input_tensor = torch.randn(2, 3, 16, 16)

ARGS = {
    'in_channels': 3,
    'out_channels': 8
}
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 head_embedding — 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 head_embedding 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
middle_embedding Ran
ran on a synthesized input · constructed an object; no result was computed
sense-x/uniformer/image_classification/models/uniformer.py
code served (permissive licence) · get_code("8f5a6c1aca9ba4de")
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, middle_embedding: 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)

# The middle_embedding class takes in_channels and out_channels as parameters
# It creates a Conv2d layer that takes input with in_channels and outputs out_channels
# For testing, we need to provide reasonable integer values for these parameters

in_channels = 3
out_channels = 16

ARGS = {
    'in_channels': in_channels,
    'out_channels': out_channels
}
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 middle_embedding — 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 middle_embedding 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
safe_divide Ran
ran, honoured the contract we drafted
towhee-io/towhee/towhee/models/uniformer/uniformer.py
code served (permissive licence) · get_code("507e144112f81dc6")
How it ran

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

import torch

torch.manual_seed(0)

# The function safe_divide takes two tensors a and b
# It performs element-wise division with clamping and masking operations
# Both parameters should be torch tensors with numeric values

a = torch.randn(2, 4)
b = torch.randn(2, 4)

ARGS = {
    "a": a,
    "b": b,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
trunc_normal_ Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
towhee-io/towhee/towhee/models/uniformer/uniformer.py
code served (permissive licence) · get_code("f3e47c6e3250d13b")
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 Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import math

torch.manual_seed(0)

# Create a small tensor to be filled with truncated normal values
tensor = torch.empty(2, 4)

# Define arguments for trunc_normal_
ARGS = {
    'tensor': tensor,
    'mean': 0.0,
    'std': 1.0,
    'a': -2.0,
    'b': 2.0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
FeedForward Not yet run
unverified (harvested, no recorded run)
lucidrains/uniformer-pytorch/uniformer_pytorch/uniformer_pytorch.py
code served (permissive licence) · get_code("298b1968dc3403b8")
How it ran

no invocation recorded. this sample carries JSON test cases instead of a setup block; get_reference_implementation serves them with the level they back.

MultiHeadAttention Not yet run
unverified (harvested, no recorded run)
towhee-io/towhee/towhee/models/uniformer/uniformer.py
code served (permissive licence) · get_code("e00c355740a3cab6")
How it ran

no invocation recorded.

RelProp Not yet run
unverified (harvested, no recorded run)
towhee-io/towhee/towhee/models/uniformer/uniformer.py
code served (permissive licence) · get_code("e04c66afc6a652b1")
How it ran

no invocation recorded.

RelPropSimple Not yet run
unverified (harvested, no recorded run)
towhee-io/towhee/towhee/models/uniformer/uniformer.py
code served (permissive licence) · get_code("1bc2938f5a5b8e2e")
How it ran

no invocation recorded.

SABlock Not yet run
unverified (harvested, no recorded run)
towhee-io/towhee/towhee/models/uniformer/uniformer.py
code served (permissive licence) · get_code("2e84a2e6147c7e87")
How it ran

no invocation recorded.

SplitSABlock Not yet run
unverified (harvested, no recorded run)
towhee-io/towhee/towhee/models/uniformer/uniformer.py
code served (permissive licence) · get_code("79921eebe00978bd")
How it ran

no invocation recorded.

UniFormer Not yet run
unverified (harvested, no recorded run)
sense-x/uniformer/image_classification/models/uniformer.py
code served (permissive licence) · get_code("199ff8d54ab96603")
How it ran

no invocation recorded.

Uniformer Not yet run
unverified (harvested, no recorded run)
towhee-io/towhee/towhee/models/uniformer/uniformer.py
code served (permissive licence) · get_code("2e4559833b1c24b6")
How it ran

no invocation recorded.

exists Not yet run
unverified (harvested, no recorded run)
lucidrains/uniformer-pytorch/uniformer_pytorch/uniformer_pytorch.py
code served (permissive licence) · get_code("570499cd4f300cb8")
How it ran

no invocation recorded. this sample carries JSON test cases instead of a setup block; get_reference_implementation serves them with the level they back.

forward_hook Not yet run
unverified (harvested, no recorded run)
towhee-io/towhee/towhee/models/uniformer/uniformer.py
code served (permissive licence) · get_code("f1b1138b372a9b03")
How it ran

no invocation recorded.

Also present in other papers' code

Of 37 samples lifted from this paper's linked repositories, 37 carry a function identity and 0 do not. Of the 37 distinct functions with an identity, 19 are also present in other papers whose code we hold (14 with at least one paper dated earlier, 13 the same month, 9 later) and 18 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
75 dated earlier, 2 the same month, 406 later, 1 same year, order not determinable, 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
drop_path
brick of this paper's assembly: helper
224 other papers
18 dated earlier, 4 the same month, 199 later, 2 same year, order not determinable, 1 undated · 38 only as an assembly brick
2003.12039 (2020-03)
RAFT: Recurrent All-Pairs Field Transforms for Optical Flow
2007.09384 (2020-07)
Multi-Scale Positive Sample Refinement for Few-Shot Object Detection
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
and 221 more not named here
trunc_normal_
brick of this paper's assembly: helper
160 other papers
16 dated earlier, 3 the same month, 140 later, 1 same year, order not determinable · 36 only as an assembly brick
1911.10194 (2019-11)
Panoptic-DeepLab: A Simple, Strong, and Fast Baseline for Bottom-Up Panoptic Segmentation
2005.10242 (2020-05)
Understanding Contrastive Representation Learning through Alignment and Uniformity on the Hypersphere
2007.12911 (2020-07)
Tighter risk certificates for neural networks
and 157 more not named here
safe_divide
brick of this paper's assembly: helper
6 other papers
2 dated earlier, 1 the same month, 3 later · 4 only as an assembly brick
2103.14030 (2021-03)
Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
2104.11227 (2021-04)
Multiscale Vision Transformers
2201.04850 (2022-01)
Bridging Video-text Retrieval with Multiple Choice Questions
and 3 more not named here
_no_grad_trunc_normal_
brick of this paper's assembly: helper
4 other papers
1 dated earlier, 2 the same month, 1 later · 3 only as an assembly brick
2103.14030 (2021-03)
Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
2201.03545 (2022-01)
A ConvNet for the 2020s
2201.04850 (2022-01)
Bridging Video-text Retrieval with Multiple Choice Questions
and 1 more not named here
RelProp
brick of this paper's assembly: helper
3 other papers
2 dated earlier, 1 the same month · 2 only as an assembly brick
2103.14030 (2021-03)
Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
2104.11227 (2021-04)
Multiscale Vision Transformers
2201.04850 (2022-01)
Bridging Video-text Retrieval with Multiple Choice Questions
forward_hook
brick of this paper's assembly: helper
3 other papers
2 dated earlier, 1 the same month · 3 only as an assembly brick
2103.14030 (2021-03)
Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
2104.11227 (2021-04)
Multiscale Vision Transformers
2201.04850 (2022-01)
Bridging Video-text Retrieval with Multiple Choice Questions
DropPath
brick of this paper's assembly: helper
2 other papers
1 the same month, 1 later · 2 only as an assembly brick
2201.03545 (2022-01)
A ConvNet for the 2020s
2204.01697 (2022-04)
MaxViT: Multi-Axis Vision Transformer
Dropout
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 the same month · 1 only as an assembly brick
2104.11227 (2021-04)
Multiscale Vision Transformers
2201.04850 (2022-01)
Bridging Video-text Retrieval with Multiple Choice Questions
GELU
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 the same month · 1 only as an assembly brick
2104.11227 (2021-04)
Multiscale Vision Transformers
2201.04850 (2022-01)
Bridging Video-text Retrieval with Multiple Choice Questions
Linear
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 the same month · 1 only as an assembly brick
2104.11227 (2021-04)
Multiscale Vision Transformers
2201.04850 (2022-01)
Bridging Video-text Retrieval with Multiple Choice Questions
_ntuple
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 the same month · 1 only as an assembly brick
2103.14030 (2021-03)
Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
2201.04850 (2022-01)
Bridging Video-text Retrieval with Multiple Choice Questions
Einsum
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2104.11227 (2021-04)
Multiscale Vision Transformers
Mlp
brick of this paper's assembly: helper
1 other paper
1 the same month
2201.04850 (2022-01)
Bridging Video-text Retrieval with Multiple Choice Questions
RelPropSimple
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2104.11227 (2021-04)
Multiscale Vision Transformers
Softmax
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2104.11227 (2021-04)
Multiscale Vision Transformers
conv_1xnxn
brick of this paper's assembly: helper
1 other paper
1 later
2406.18070 (2024-06)
EgoVideo: Exploring Egocentric Foundation Model and Downstream Adaptation
conv_3xnxn
brick of this paper's assembly: helper
1 other paper
1 later
2406.18070 (2024-06)
EgoVideo: Exploring Egocentric Foundation Model and Downstream Adaptation
conv_3xnxn_std
brick of this paper's assembly: helper
1 other paper
1 later
2406.18070 (2024-06)
EgoVideo: Exploring Egocentric Foundation Model and Downstream Adaptation

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

Repositories linked to this paper

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

Abstract

It is a challenging task to learn rich and multi-scale spatiotemporal semantics from high-dimensional videos, due to large local redundancy and complex global dependency between video frames. The recent advances in this research have been mainly driven by 3D convolutional neural networks and vision transformers. Although 3D convolution can efficiently aggregate local context to suppress local redundancy from a small 3D neighborhood, it lacks the capability to capture global dependency because of the limited receptive field. Alternatively, vision transformers can effectively capture long-range dependency by self-attention mechanism, while having the limitation on reducing local redundancy with blind similarity comparison among all the tokens in each layer. Based on these observations, we propose a novel Unified transFormer (UniFormer) which seamlessly integrates merits of 3D convolution and spatiotemporal self-attention in a concise transformer format, and achieves a preferable balance between computation and accuracy. Different from traditional transformers, our relation aggregator can tackle both spatiotemporal redundancy and dependency, by learning local and global token affinity respectively in shallow and deep layers. We conduct extensive experiments on the popular video benchmarks, e.g., Kinetics-400, Kinetics-600, and Something-Something V1&V2. With only ImageNet-1K pretraining, our UniFormer achieves 82.9%/84.8% top-1 accuracy on Kinetics-400/Kinetics-600, while requiring 10× fewer GFLOPs than other state-of-the-art methods. For Something-Something V1 and V2, our UniFormer achieves new state-of-the-art performances of 60.9% and 71.2% top-1 accuracy respectively. Code is available at https://github.com/Sense-X/UniFormer.

For agents

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

get_harvested_code_for_paper("2201.04676")
get_code_for_paper("2201.04676")
have("2201.04676")

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

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

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

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

Connect an agent — have() is free.