SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2204.01697 · ECCV · 2022

MaxViT: Multi-Axis Vision Transformer

Han Zhang, Zhengzhong Tu, Alan Bovik, Feng Yang, Peyman Milanfar, Yinxiao Li, Hossein Talebi, Coatnet Cswin, Cait Convnext, Swin Focal, M-T M-S M-B Maxvit-L, Convnext Coatnet, and 3 more

arXiv · PDF · Open in the Atlas

Code that ran

37 of 53 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (15 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 0 violated it and 18 have no contract verdict; 17 failures of our instrument; 16 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/2204.01697.json · badge: /api/ran/2204.01697.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
hankyul2/maxvit-pytorch community
Papers with Code archive
8 ran · 1 no recorded run
lucidrains/vit-pytorch community
Papers with Code archive
8 ran · 0 no recorded run
towhee-io/towhee community
Papers with Code archive
7 ran · 5 no recorded run
google-research/maxim community
Papers with Code archive
5 ran · 2 no recorded run
google-research/maxvit marked official in Papers with Code
Papers with Code archive
4 ran · 7 no recorded run
ChristophReich1996/MaxViT community (classifier label)
classifier basis not recorded on the link
3 ran · 0 no recorded run
qwopqwop200/MaxVIT-pytorch community (classifier label)
classifier basis not recorded on the link
2 ran · 1 no recorded run
FunctionStatusWhere it lives
Attention Ran
ran on a synthesized input · constructed an object; no result was computed
google-research/maxvit/maxvit/models/maxvit.py
code served (permissive licence) · get_code("2bc733f08e821139")
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, Attention: 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 tensorflow as tf
import string

# Define ARGS dictionary for Attention function
ARGS = {
    'hidden_size': 8,
    'head_size': 4,
    'num_heads': 2,
    'dropatt': 0.1,
    'attn_axis': 0,
    'rel_attn_type': None,
    'scale_ratio': None,
    'kernel_initializer': tf.random_normal_initializer(stddev=0.02),
    'bias_initializer': tf.zeros_initializer,
    'name': 'attention'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
absl, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Attention — 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 Attention 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
Attention Ran
ran on a synthesized input · constructed an object; no result was computed
lucidrains/vit-pytorch/vit_pytorch/max_vit.py
code served (permissive licence) · get_code("0ff4fe4361d49089")
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, Attention: 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 Attention module expects input of shape:
# (batch, height, width, window_height, window_width, dim)
# where the tensor is already windowed

batch = 2
height = 2
width = 2
window_height = 3
window_width = 3
dim = 4
dim_head = 2
dropout = 0.1
window_size = 7

# Create a tensor with the exact shape the forward method expects
x = torch.randn(batch, height, width, window_height, window_width, dim)

ARGS = {
    "dim": dim,
    "dim_head": dim_head,
    "dropout": dropout,
    "window_size": window_size,
}
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 Attention — 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 Attention 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
Attention2d Ran
ran on a synthesized input · constructed an object; no result was computed
hankyul2/maxvit-pytorch/maxvit.py
pointer only (licence: NONE) · get_code("d227ba24d7d8d855")
How it ran

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

BatchNormalization Ran
ran on a synthesized input
google-research/maxvit/maxvit/models/maxvit.py
code served (permissive licence) · get_code("e2718d640d43e769")
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 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 tensorflow as tf
import numpy as np

# Set up TensorFlow for eager execution
tf.config.run_functions_eagerly(True)

INIT_ARGS = {
    'momentum': 0.99,
    'epsilon': 1e-3,
    'center': True,
    'scale': True,
}

ARGS = {
    'inputs': tf.constant(np.random.randn(2, 4).astype(np.float32)),
    'training': False,
}

# Construct the class
batch_norm = tf.keras.layers.BatchNormalization(**INIT_ARGS)

# Build the layer by calling it once
_ = batch_norm(ARGS['inputs'], training=ARGS['training'])

# Call the layer
output = batch_norm(ARGS['inputs'], training=ARGS['training'])

print("Output shape:", output.shape)
print("Output dtype:", output.dtype)
print("Success!")
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 2, 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)
BlockGatingUnit Ran
ran on a synthesized input · constructed an object; no result was computed
google-research/maxim/maxim/models/maxim.py
code served (permissive licence) · get_code("d8da107e27ecbe28")
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, BlockGatingUnit: 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

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

# Create a small input tensor with shape (batch=2, sequence=3, features=8)
# The function splits on the last axis, so we need an even number of features
x = jnp.ones((2, 3, 8), dtype=jnp.float32)

# Define ARGS - BlockGatingUnit only has one parameter: use_bias
ARGS = {
    'use_bias': True
}
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 BlockGatingUnit — 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 BlockGatingUnit 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
BlockGmlpLayer Ran
ran on a synthesized input · constructed an object; no result was computed
google-research/maxim/maxim/models/maxim.py
code served (permissive licence) · get_code("325b31d5363dae7d")
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, BlockGmlpLayer: 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

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

# Define the arguments for BlockGmlpLayer
ARGS = {
    'block_size': (2, 2),  # (fh, fw) - block size for spatial dimensions
    'use_bias': True,
    'factor': 2,
    'dropout_rate': 0.0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type BlockGmlpLayer — 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 BlockGmlpLayer 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
Dropsample Ran
ran on a synthesized input · constructed an object; no result was computed
lucidrains/vit-pytorch/vit_pytorch/max_vit.py
code served (permissive licence) · get_code("b3be1bfa6f51c051")
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, Dropsample: 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)

# Dropsample only uses self.prob and self.training in forward()
# The forward method expects x to be a tensor and accesses x.device and x.shape
# We need to test it both in training and eval mode

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.dropsample = nn.Module()  # placeholder
    
    def forward(self, x):
        return x

# Create a small tensor for testing (batch_size=2, channels=4, height=3, width=5)
x = torch.randn(2, 4, 3, 5)

ARGS = {
    "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 Dropsample — 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 Dropsample 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
FeedForward Ran
ran on a synthesized input
lucidrains/vit-pytorch/vit_pytorch/max_vit.py
code served (permissive licence) · get_code("32bd4f3abdceaefe")
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 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
from torch import nn

class FeedForward(nn.Module):

    def __init__(self, dim, mult=4, dropout=0.0):
        super().__init__()
        inner_dim = int(dim * mult)
        self.net = nn.Sequential(nn.LayerNorm(dim), nn.Linear(dim, inner_dim), nn.GELU(), nn.Dropout(dropout), nn.Linear(inner_dim, dim), nn.Dropout(dropout))

    def forward(self, x):
        return self.net(x)


INIT_ARGS = {
    'dim': 4,
    'mult': 4,
    'dropout': 0.1,
}

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

model = FeedForward(**INIT_ARGS)
output = model(**ARGS)
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 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
GridGatingUnit Ran
ran on a synthesized input · constructed an object; no result was computed
google-research/maxim/maxim/models/maxim.py
code served (permissive licence) · get_code("86d6d05360b6903b")
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, GridGatingUnit: 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

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

# Create a small test input tensor
# Shape: (batch=2, spatial_dim=4, spatial_dim=3, channels=8)
# The function splits on last axis, so we need even number of channels
batch_size = 2
spatial_n = 4
spatial_m = 3
channels = 8

x = jnp.ones((batch_size, spatial_n, spatial_m, channels))

# GridGatingUnit only has one parameter: use_bias
ARGS = {
    "use_bias": True,
}
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 GridGatingUnit — 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 GridGatingUnit 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
LayerScale2d Ran
ran on a synthesized input · constructed an object; no result was computed
hankyul2/maxvit-pytorch/maxvit.py
pointer only (licence: NONE) · get_code("8fa30deee34804c0")
How it ran

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

MBConv Ran
ran; our contract draft was wrong, not the code
lucidrains/vit-pytorch/vit_pytorch/max_vit.py
code served (permissive licence) · get_code("6b918699878401db")
How it ran

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

import torch
from torch import nn

torch.manual_seed(0)

ARGS = {
    'dim_in': 4,
    'dim_out': 8,
    'downsample': False,
    'expansion_rate': 4,
    'shrinkage_rate': 0.25,
    'dropout': 0.1,
}
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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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
MBConvResidual Ran
ran on a synthesized input · constructed an object; no result was computed
lucidrains/vit-pytorch/vit_pytorch/max_vit.py
code served (permissive licence) · get_code("f4987984f431cfd0")
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, MBConvResidual: 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 SimpleConvBlock(nn.Module):
    """Minimal conv block that takes input and returns output of same shape"""
    def __init__(self):
        super().__init__()
        self.conv = nn.Conv2d(4, 4, kernel_size=1, padding=0)
    
    def forward(self, x):
        return self.conv(x)

fn = SimpleConvBlock()

ARGS = {
    'fn': fn,
    'dropout': 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 MBConvResidual — 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 MBConvResidual 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
MaxViT Ran
ran on a synthesized input · constructed an object; no result was computed
lucidrains/vit-pytorch/vit_pytorch/max_vit.py
code served (permissive licence) · get_code("7e1c7833684c337a")
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, MaxViT: 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 = {
    "num_classes": 10,
    "dim": 64,
    "depth": (2, 2, 2),
    "dim_head": 32,
    "dim_conv_stem": 32,
    "window_size": 7,
    "mbconv_expansion_rate": 4,
    "mbconv_shrinkage_rate": 0.25,
    "dropout": 0.1,
    "channels": 3,
}
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 MaxViT — 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 MaxViT 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
MaxxVitTransformerCfg Ran
ran on a synthesized input · constructed an object; no result was computed
hankyul2/maxvit-pytorch/maxvit.py
pointer only (licence: NONE) · get_code("08082022ac2c6e65")
How it ran

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

RelativeSelfAttention Ran
ran on a synthesized input · constructed an object; no result was computed
towhee-io/towhee/towhee/models/max_vit/max_vit.py
code served (permissive licence) · get_code("c72be25671079b1b")
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, RelativeSelfAttention: 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 typing import Tuple

torch.manual_seed(0)

# Define ARGS dict with all parameters for RelativeSelfAttention
ARGS = {
    "in_channels": 64,
    "num_heads": 8,
    "grid_window_size": (7, 7),
    "attn_drop": 0.1,
    "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 RelativeSelfAttention — 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 RelativeSelfAttention 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
Residual Ran
ran on a synthesized input · constructed an object; no result was computed
lucidrains/vit-pytorch/vit_pytorch/max_vit.py
code served (permissive licence) · get_code("636a208dabc2a711")
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, Residual: 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)

# Define a simple function module that takes x and returns a transformed tensor
class SimpleTransform(nn.Module):
    def __init__(self, dim):
        super().__init__()
        self.linear = nn.Linear(dim, dim)
    
    def forward(self, x):
        return self.linear(x)

# Set up the arguments
dim = 4
fn = SimpleTransform(dim)

ARGS = {
    'dim': dim,
    'fn': fn
}
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 Residual — 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 Residual 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
SqueezeExcitation Ran
ran on a synthesized input · constructed an object; no result was computed
lucidrains/vit-pytorch/vit_pytorch/max_vit.py
code served (permissive licence) · get_code("b15b0232b5e08a9c")
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, SqueezeExcitation: 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 einops.layers.torch import Rearrange, Reduce

torch.manual_seed(0)

# Create a small input tensor for testing
# Shape: (batch=2, channels=4, height=3, width=3)
x = torch.randn(2, 4, 3, 3)

# The SqueezeExcitation module takes:
# - dim: the channel dimension
# - shrinkage_rate: optional parameter for the bottleneck

ARGS = {
    'dim': 4,
    'shrinkage_rate': 0.25
}
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 SqueezeExcitation — 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 SqueezeExcitation 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
TrailDense Ran
ran on a synthesized input · constructed an object; no result was computed
google-research/maxvit/maxvit/models/maxvit.py
code served (permissive licence) · get_code("839c67588aa822e2")
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, TrailDense: 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 tensorflow as tf
import string

ARGS = {
    'output_trailing_dims': [3, 2],
    'begin_axis': -1,
    'use_bias': True,
    'kernel_initializer': tf.random_normal_initializer(stddev=0.02),
    'bias_initializer': tf.zeros_initializer(),
    'name': 'dense'
}
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 TrailDense — 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 TrailDense 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
block Ran
ran on a synthesized input
qwopqwop200/MaxVIT-pytorch/MaxVIT.py
code served (permissive licence) · get_code("5d26f1a66e6a15e4")
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 6, dtype family float, shape (2, 4, 2, 4, 2, 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
import numpy as np

torch.manual_seed(0)

# Create a small tensor with distinct dimensions for clarity
# Shape: (B=2, C=4, H=8, W=6)
# H and W are chosen to be divisible by common window sizes
x = torch.randn(2, 4, 8, 6)

# Define window_size - tuple of (window_height, window_width)
# Choose sizes that divide evenly into H and W
window_size = (2, 3)

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

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (2, 4, 24, 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
import einops

torch.manual_seed(0)

# Create a small test image tensor
# Shape: (batch, height, width, channels)
# Using distinct sizes: batch=2, height=8, width=12, channels=3
x = torch.randn(2, 8, 12, 3)

# Define patch size as a tuple
patch_size = (4, 6)

ARGS = {
    'x': x,
    'patch_size': patch_size
}
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 Tensor, ndim 4, dtype family float, shape (2, 4, 24, 3) — shape (2, 4, 24, 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
drop_path Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
qwopqwop200/MaxVIT-pytorch/MaxVIT.py
code served (permissive licence) · get_code("971ae8d2d8313e30")
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)

ARGS = {
    "x": x,
    "drop_prob": 0.5,
    "training": True,
    "scale_by_keep": 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
float32_softmax Ran
ran, honoured the contract we drafted
google-research/maxvit/maxvit/models/maxvit.py
code served (permissive licence) · get_code("5ecfa57092a8cecc")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned EagerTensor, ndim 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 tensorflow as tf
import numpy as np

# Create a small float32 tensor input
x = tf.constant([[0.1, 0.2, 0.3, 0.4],
                 [0.5, 0.6, 0.7, 0.8]], dtype=tf.float32)

# Define ARGS dict with all parameters
ARGS = {
    'x': x,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 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
gelu_ignore_parameters Ran
ran; our contract draft was wrong, not the code
towhee-io/towhee/towhee/models/max_vit/max_vit.py
code served (permissive licence) · get_code("48de7cab87cd24fa")
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 GELU. 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 gelu_ignore_parameters accepts *args and **kwargs but ignores them
# It simply returns an nn.GELU() module
# Since it ignores all arguments, we can pass empty args and kwargs

ARGS = {
    'args': (),
    'kwargs': {}
}
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 — a GELU output has no array shape of its own; none 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
get_rel_pos_cls Ran
ran; our contract draft was wrong, not the code
hankyul2/maxvit-pytorch/maxvit.py
pointer only (licence: NONE) · get_code("9d7347fa5b820e84")
How it ran

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

get_relative_position_index Ran
ran, honoured the contract we drafted
towhee-io/towhee/towhee/models/max_vit/max_vit.py
code served (permissive licence) · get_code("2e62acbb2e8ec0a9")
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 int, shape (12, 12) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function takes window height and width as integers
# and returns a tensor of relative position indices
# We'll use small integer values for the window dimensions

ARGS = {
    "win_h": 3,
    "win_w": 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 Tensor, ndim 2, dtype family int, shape (12, 12) — shape (12, 12) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
grid_partition Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
towhee-io/towhee/towhee/models/max_vit/max_vit.py
code served (permissive licence) · get_code("702e2dca4d951046")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (12, 7, 7, 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)

# Construct the arguments for grid_partition
# The function expects:
# - data: torch.Tensor of shape [B, C, H, W]
# - grid_size: Tuple[int, int] with default (7, 7)

# For grid_partition to work, H must be divisible by grid_size[0]
# and W must be divisible by grid_size[1]
# Using grid_size=(7, 7), we need H and W to be multiples of 7
# Let's use H=14, W=21 for distinct dimensions

B = 2  # batch size
C = 4  # channels
H = 14  # height (divisible by 7)
W = 21  # width (divisible by 7)

data = torch.randn(B, C, H, W)
grid_size = (7, 7)

ARGS = {
    "data": data,
    "grid_size": grid_size,
}
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 4, dtype family float, shape (12, 7, 7, 4) — shape (12, 7, 7, 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
grid_partition Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ChristophReich1996/MaxViT/maxvit/maxvit.py
code served (permissive licence) · get_code("bbc5501012bdee68")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (12, 7, 7, 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)

# Construct input tensor
# Shape: [B, C, H, W]
# B=2 (batch), C=4 (channels), H=14 (height), W=21 (width)
# These dimensions are chosen so they're divisible by grid_size (7, 7)
input_tensor = torch.randn(2, 4, 14, 21)

# Construct grid_size parameter
grid_size = (7, 7)

ARGS = {
    "input": input_tensor,
    "grid_size": grid_size,
}
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 4, dtype family float, shape (12, 7, 7, 4) — shape (12, 7, 7, 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
grid_partition_nchw Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hankyul2/maxvit-pytorch/maxvit.py
pointer only (licence: NONE) · get_code("f41c6472d974b50b")
How it ran

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

grid_reverse Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
towhee-io/towhee/towhee/models/max_vit/max_vit.py
code served (permissive licence) · get_code("3b95c931d4a4355d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (2, 3, 14, 14) 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)

# Analyze the function:
# - grid: torch.Tensor with shape [B * grids, grid_size[0], grid_size[1], C]
# - original_size: Tuple[int, int] for (h, w)
# - grid_size: Tuple[int, int] with default (7, 7)
# The function computes: b = grid.shape[0] / (h * w / grid_size[0] / grid_size[1])
# So: grid.shape[0] = b * (h * w) / (grid_size[0] * grid_size[1])

# Let's use:
# - original_size = (14, 14) so h=14, w=14
# - grid_size = (7, 7)
# - Then number of grids per batch = (14*14)/(7*7) = 196/49 = 4
# - Let's say b=2 (batch size), so grid.shape[0] = 2 * 4 = 8
# - Let's use C=3 channels

original_size = (14, 14)
grid_size = (7, 7)
h, w = original_size
c = 3
b = 2
num_grids = (h * w) // (grid_size[0] * grid_size[1])
grid_batch_size = b * num_grids

# Create grid tensor with shape [B * grids, grid_size[0], grid_size[1], C]
grid = torch.randn(grid_batch_size, grid_size[0], grid_size[1], c)

ARGS = {
    "grid": grid,
    "original_size": original_size,
    "grid_size": grid_size,
}
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 4, dtype family float, shape (2, 3, 14, 14) — shape (2, 3, 14, 14) 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
grid_reverse_nchw Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hankyul2/maxvit-pytorch/maxvit.py
pointer only (licence: NONE) · get_code("80cee5fcd8a9952b")
How it ran

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

unblock_images_einops Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
google-research/maxim/maxim/models/maxim.py
code served (permissive licence) · get_code("627ea4c76565d927")
How it ran

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

import torch
import einops

torch.manual_seed(0)

# Analyze the function:
# - x: a tensor that will be rearranged
# - grid_size: tuple/list with 2 elements (gh, gw)
# - patch_size: tuple/list with 2 elements (fh, fw)
#
# The rearrange operation expects:
# Input shape: n (gh gw) (fh fw) c
# Output shape: n (gh fh) (gw fw) c
#
# Let's choose:
# - n = 2 (batch size)
# - gh = 3, gw = 4 (grid dimensions - distinct)
# - fh = 2, fw = 3 (patch dimensions - distinct)
# - c = 5 (channels - distinct)
#
# Input tensor shape: (2, 12, 6, 5) = (n, gh*gw, fh*fw, c)

n = 2
gh, gw = 3, 4
fh, fw = 2, 3
c = 5

# Create input tensor with shape (n, gh*gw, fh*fw, c)
x = torch.randn(n, gh*gw, fh*fw, c)

grid_size = (gh, gw)
patch_size = (fh, fw)

ARGS = {
    'x': x,
    'grid_size': grid_size,
    'patch_size': patch_size
}
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 Tensor, ndim 4, dtype family float, shape (2, 6, 12, 5) — shape (2, 6, 12, 5) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
window_partition Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
towhee-io/towhee/towhee/models/max_vit/max_vit.py
code served (permissive licence) · get_code("ab7995b8493f8bd3")
How it ran

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

import torch

torch.manual_seed(0)

# Create a small input tensor of shape [B, C, H, W]
# B=2 (batch), C=4 (channels), H=14 (height), W=14 (width)
# These dimensions are chosen so they're divisible by default window_size (7, 7)
data = torch.randn(2, 4, 14, 14)

# Window size
window_size = (7, 7)

ARGS = {
    "data": data,
    "window_size": window_size,
}
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 4, dtype family float, shape (8, 7, 7, 4) — shape (8, 7, 7, 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
window_partition Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ChristophReich1996/MaxViT/maxvit/maxvit.py
code served (permissive licence) · get_code("20f2f90659c203e1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (8, 7, 7, 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)

# Construct a small input tensor of shape [B, C, H, W]
# where B=2, C=4, H=14, W=14 (divisible by window_size (7,7))
input_tensor = torch.randn(2, 4, 14, 14)

# Define window size
window_size = (7, 7)

ARGS = {
    "input": input_tensor,
    "window_size": window_size,
}
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 4, dtype family float, shape (8, 7, 7, 4) — shape (8, 7, 7, 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
window_partition_nchw Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hankyul2/maxvit-pytorch/maxvit.py
pointer only (licence: NONE) · get_code("ae8a9a667b5d42f9")
How it ran

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

window_reverse Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
towhee-io/towhee/towhee/models/max_vit/max_vit.py
code served (permissive licence) · get_code("10fe1fb26b9e9e9d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (2, 4, 14, 14) 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 reverses a window partition operation.
# It takes windows of shape [B * num_windows, window_size[0], window_size[1], C]
# and reconstructs the original tensor of shape [B, C, original_size[0], original_size[1]]

# Let's construct valid arguments:
# - original_size: (14, 14) - the original height and width
# - window_size: (7, 7) - the window dimensions
# This means we have (14/7) * (14/7) = 4 windows per batch
# With B=2 batches, we have 2*4=8 total windows

original_size = (14, 14)
window_size = (7, 7)

# Number of windows: (h/window_h) * (w/window_w) = (14/7) * (14/7) = 4 windows per batch
# With batch size B=2, total windows = 2 * 4 = 8
# Each window is (7, 7) with C=4 channels
# Shape: [B * num_windows, window_h, window_w, C] = [8, 7, 7, 4]

b = 2
num_windows_per_batch = (original_size[0] // window_size[0]) * (original_size[1] // window_size[1])
total_windows = b * num_windows_per_batch
channels = 4

windows = torch.randn(total_windows, window_size[0], window_size[1], channels)

ARGS = {
    "windows": windows,
    "original_size": original_size,
    "window_size": window_size,
}
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 4, dtype family float, shape (2, 4, 14, 14) — shape (2, 4, 14, 14) 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
window_reverse Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ChristophReich1996/MaxViT/maxvit/maxvit.py
code served (permissive licence) · get_code("cd52f54038e59852")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (2, 4, 14, 14) 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)

# Understanding the function:
# - windows: tensor of shape [B * num_windows, window_h, window_w, C]
#   where num_windows = (H // window_h) * (W // window_w)
# - original_size: (H, W) - the original image dimensions
# - window_size: (window_h, window_w) - the window dimensions used for partitioning
# - Returns: tensor of shape [B, C, H, W]

# Let's construct valid arguments:
# Original image: H=14, W=14
# Window size: 7x7
# This means we have (14//7) * (14//7) = 2*2 = 4 windows per batch
# Batch size: B=2
# Channels: C=4

H, W = 14, 14
window_h, window_w = 7, 7
B = 2
C = 4

# Number of windows: (H // window_h) * (W // window_w) = 4
num_windows = (H // window_h) * (W // window_w)

# windows shape should be [B * num_windows, window_h, window_w, C]
# = [2 * 4, 7, 7, 4] = [8, 7, 7, 4]
windows = torch.randn(B * num_windows, window_h, window_w, C)

original_size = (H, W)
window_size = (window_h, window_w)

ARGS = {
    "windows": windows,
    "original_size": original_size,
    "window_size": window_size,
}
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 4, dtype family float, shape (2, 4, 14, 14) — shape (2, 4, 14, 14) 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
window_reverse_nchw Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hankyul2/maxvit-pytorch/maxvit.py
pointer only (licence: NONE) · get_code("c72f01470606b887")
How it ran

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

FFN Not yet run
unverified (harvested, no recorded run)
google-research/maxvit/maxvit/models/maxvit.py
code served (permissive licence) · get_code("f50211588bf5be8b")
How it ran

no invocation recorded.

GridGmlpLayer Not yet run
unverified (harvested, no recorded run)
google-research/maxim/maxim/models/maxim.py
code served (permissive licence) · get_code("bcddd7996b51db67")
How it ran

no invocation recorded.

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

no invocation recorded.

MBConvBlock Not yet run
unverified (harvested, no recorded run)
google-research/maxvit/maxvit/models/maxvit.py
code served (permissive licence) · get_code("2d7a9595c2215efd")
How it ran

no invocation recorded.

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

no invocation recorded.

MaxViTBlock Not yet run
unverified (harvested, no recorded run)
google-research/maxvit/maxvit/models/maxvit.py
code served (permissive licence) · get_code("c99919623d98cd27")
How it ran

no invocation recorded.

MaxViTBlock Not yet run
unverified (harvested, no recorded run)
towhee-io/towhee/towhee/models/max_vit/max_vit.py
code served (permissive licence) · get_code("04bab611e8e60c1e")
How it ran

no invocation recorded.

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

no invocation recorded.

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

no invocation recorded.

PartitionAttention2d Not yet run
unverified (harvested, no recorded run)
hankyul2/maxvit-pytorch/maxvit.py
pointer only (licence: NONE) · get_code("641d6f2b8dbc0745")
How it ran

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

ResidualSplitHeadMultiAxisGmlpLayer Not yet run
unverified (harvested, no recorded run)
google-research/maxim/maxim/models/maxim.py
code served (permissive licence) · get_code("e7fa9568a4a28913")
How it ran

no invocation recorded.

SE Not yet run
unverified (harvested, no recorded run)
google-research/maxvit/maxvit/models/maxvit.py
code served (permissive licence) · get_code("ee80113a460390fe")
How it ran

no invocation recorded.

TpuBatchNormalization Not yet run
unverified (harvested, no recorded run)
google-research/maxvit/maxvit/models/maxvit.py
code served (permissive licence) · get_code("d237bfe09ec44cfd")
How it ran

no invocation recorded.

config_batch_norm Not yet run
unverified (harvested, no recorded run)
google-research/maxvit/maxvit/models/maxvit.py
code served (permissive licence) · get_code("20213f171bc1c7e9")
How it ran

no invocation recorded.

create_config_from_dict Not yet run
unverified (harvested, no recorded run)
google-research/maxvit/maxvit/models/maxvit.py
code served (permissive licence) · get_code("256b0e25fa8d8cee")
How it ran

no invocation recorded.

unblock Not yet run
unverified (harvested, no recorded run)
qwopqwop200/MaxVIT-pytorch/MaxVIT.py
code served (permissive licence) · get_code("6eaf2972dbdcacc3")
How it ran

no invocation recorded.

Also present in other papers' code

Of 53 samples lifted from this paper's linked repositories, 53 carry a function identity and 0 do not. Of the 53 distinct functions with an identity, 13 are also present in other papers whose code we hold (8 with at least one paper dated earlier, 1 the same month, 6 later) and 40 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
drop_path 66 other papers
7 dated earlier, 1 the same month, 56 later, 2 undated · 15 only as an assembly brick
1906.01502 (2019-06)
How multilingual is Multilingual BERT?
2011.10566 (2020-11)
Exploring Simple Siamese Representation Learning
2103.03230 (2021-03)
Barlow Twins: Self-Supervised Learning via Redundancy Reduction
and 63 more not named here
get_relative_position_index
brick of this paper's assembly: helper
3 other papers
3 later
2207.05557 (2022-07)
LightViT: Towards Light-Weight Convolution-Free Vision Transformers
2023.findings-emnlp.107 (2023 (year only))
Global Structure Knowledge-Guided Relation Extraction Method for Visually-Rich Document
2505.19813 (2025-05)
GoLF-NRT: Integrating Global Context and Local Geometry for Few-Shot View Synthesis *
MBConv
brick of this paper's assembly: model
2 other papers
2 later
2303.09508 (2023-03)
LDMVFI: Video Frame Interpolation with Latent Diffusion Models
aaai_27912 (2024 (year only))
LDMVFI: Video Frame Interpolation with Latent Diffusion Models
BlockGatingUnit
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2201.02973 (2022-01)
MAXIM: Multi-Axis MLP for Image Processing
BlockGmlpLayer
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2201.02973 (2022-01)
MAXIM: Multi-Axis MLP for Image Processing
GridGatingUnit
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2201.02973 (2022-01)
MAXIM: Multi-Axis MLP for Image Processing
GridGmlpLayer
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2201.02973 (2022-01)
MAXIM: Multi-Axis MLP for Image Processing
ResidualSplitHeadMultiAxisGmlpLayer
brick of this paper's assembly: entry
1 other paper
1 dated earlier · 1 only as an assembly brick
2201.02973 (2022-01)
MAXIM: Multi-Axis MLP for Image Processing
block_images_einops
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2201.02973 (2022-01)
MAXIM: Multi-Axis MLP for Image Processing
grid_partition 1 other paper
1 later
2505.19813 (2025-05)
GoLF-NRT: Integrating Global Context and Local Geometry for Few-Shot View Synthesis *
unblock_images_einops
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2201.02973 (2022-01)
MAXIM: Multi-Axis MLP for Image Processing
window_partition 1 other paper
1 later
2505.19813 (2025-05)
GoLF-NRT: Integrating Global Context and Local Geometry for Few-Shot View Synthesis *
window_reverse 1 other paper
1 later
2505.19813 (2025-05)
GoLF-NRT: Integrating Global Context and Local Geometry for Few-Shot View Synthesis *

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

Transformers have recently gained significant attention in the computer vision community. However, the lack of scalability of selfattention mechanisms with respect to image size has limited their wide adoption in state-of-the-art vision backbones. In this paper we introduce an efficient and scalable attention model we call multi-axis attention, which consists of two aspects: blocked local and dilated global attention. These design choices allow global-local spatial interactions on arbitrary input resolutions with only linear complexity. We also present a new architectural element by effectively blending our proposed attention model with convolutions, and accordingly propose a simple hierarchical vision backbone, dubbed MaxViT, by simply repeating the basic building block over multiple stages. Notably, MaxViT is able to "see" globally throughout the entire network, even in earlier, high-resolution stages. We demonstrate the effectiveness of our model on a broad spectrum of vision tasks. On image classification, MaxViT achieves state-of-the-art performance under various settings: without extra data, MaxViT attains 86.5% ImageNet-1K top-1 accuracy; with ImageNet-21K pre-training, our model achieves 88.7% top-1 accuracy. For downstream tasks, MaxViT as a backbone delivers favorable performance on object detection as well as visual aesthetic assessment. We also show that our proposed model expresses strong generative modeling capability on ImageNet, demonstrating the superior potential of MaxViT blocks as a universal vision module. The source code and trained models will be available at https://github.com/google-research/maxvit.

For agents

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

get_harvested_code_for_paper("2204.01697")
get_code_for_paper("2204.01697")
have("2204.01697")

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

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

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

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

Connect an agent — have() is free.