SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2206.09959 · ICML · 2023

Global Context Vision Transformers

Jan Kautz, Ali Hatamizadeh, Hongxu Yin, Greg Heinrich, Pavlo Molchanov

arXiv · PDF · Open in the Atlas

Code that ran

21 of 36 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (8 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; 5 failures of our instrument; 15 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2206.09959.json · badge: /api/ran/2206.09959.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
nvlabs/gcvit community
Papers with Code archive
12 ran · 3 no recorded run
awsaf49/gcvit-tf reimplementation (classifier label)
classifier basis: classifier_2025
5 ran · 11 no recorded run
EMalagoli92/GCViT-TensorFlow community (classifier label)
classifier basis not recorded on the link
3 ran · 1 no recorded run
shkarupa-alex/tfgcvit community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
FunctionStatusWhere it lives
DropPath Ran
ran on a synthesized input
awsaf49/gcvit-tf/gcvit/models/gcvit.py
code served (permissive licence) · get_code("cb662ef431014eb8")
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 3, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tensorflow as tf
import numpy as np

# Register the class
@tf.keras.utils.register_keras_serializable(package='gcvit')
class DropPath(tf.keras.layers.Layer):

    def __init__(self, drop_prob=0.0, scale_by_keep=True, **kwargs):
        super().__init__(**kwargs)
        self.drop_prob = drop_prob
        self.scale_by_keep = scale_by_keep

    def call(self, x, training=None):
        if self.drop_prob == 0.0 or not training:
            return x
        keep_prob = 1 - self.drop_prob
        shape = (tf.shape(x)[0],) + (1,) * (len(tf.shape(x)) - 1)
        random_tensor = keep_prob + tf.random.uniform(shape, 0, 1)
        random_tensor = tf.floor(random_tensor)
        if random_tensor.dtype != x.dtype:
            random_tensor = tf.cast(random_tensor, dtype=x.dtype)
        if keep_prob > 0.0 and self.scale_by_keep:
            x = x / keep_prob
        return x * random_tensor

    def get_config(self):
        config = super().get_config()
        config.update({'drop_prob': self.drop_prob, 'scale_by_keep': self.scale_by_keep})
        return config

INIT_ARGS = {
    'drop_prob': 0.2,
    'scale_by_keep': True
}

ARGS = {
    'x': tf.constant(np.random.randn(2, 4, 6).astype(np.float32)),
    'training': True
}
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 3, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
FeatExtract Ran
ran on a synthesized input · constructed an object; no result was computed
nvlabs/gcvit/models/gc_vit.py
pointer only (licence: NOASSERTION) · get_code("e80b67aa418a782c")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, nvlabs/gcvit (NOASSERTION). 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.

FitWindow Ran
ran on a synthesized input
awsaf49/gcvit-tf/gcvit/models/gcvit.py
code served (permissive licence) · get_code("a04bd08a4102e137")
How it ran

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

@tf.keras.utils.register_keras_serializable(package='gcvit')
class FitWindow(tf.keras.layers.Layer):
    """Pad feature to fit window"""

    def __init__(self, window_size, **kwargs):
        super().__init__(**kwargs)
        self.window_size = window_size

    def call(self, inputs):
        B, H, W, C = tf.unstack(tf.shape(inputs), num=4)
        h_pad = (self.window_size - H % self.window_size) % self.window_size
        w_pad = (self.window_size - W % self.window_size) % self.window_size
        x = tf.pad(inputs, [[0, 0], [h_pad // 2, h_pad // 2 + h_pad % 2], [w_pad // 2, w_pad // 2 + w_pad % 2], [0, 0]])
        return x

    def get_config(self):
        config = super().get_config()
        config.update({'window_size': self.window_size})
        return config


INIT_ARGS = {
    'window_size': 8
}

ARGS = {
    'inputs': tf.random.normal((2, 5, 7, 4))
}

layer = FitWindow(**INIT_ARGS)
output = layer(**ARGS)
print(f"Input shape: {ARGS['inputs'].shape}")
print(f"Output shape: {output.shape}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 4, dtype family float, shape (2, 8, 8, 4) — shape (2, 8, 8, 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)
GlobalQueryGen Ran
ran on a synthesized input · constructed an object; no result was computed
nvlabs/gcvit/models/gc_vit.py
pointer only (licence: NOASSERTION) · get_code("61c6465aba600b84")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, nvlabs/gcvit (NOASSERTION). 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.

Identity Ran
ran on a synthesized input
awsaf49/gcvit-tf/gcvit/models/gcvit.py
code served (permissive licence) · get_code("fc4f231a89851495")
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, 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

INIT_ARGS = {}

ARGS = {
    'x': tf.constant([[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]], dtype=tf.float32)
}

layer = tf.keras.layers.Identity(**INIT_ARGS)
output = layer(ARGS['x'])
print("Output shape:", output.shape)
print("Output:", output.numpy())
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 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)
Mlp Ran
ran on a synthesized input · constructed an object; no result was computed
nvlabs/gcvit/models/gc_vit.py
pointer only (licence: NOASSERTION) · get_code("54d976068690d3d1")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, nvlabs/gcvit (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

Mlp Ran
ran on a synthesized input
awsaf49/gcvit-tf/gcvit/models/gcvit.py
code served (permissive licence) · get_code("175f4b05a6f94cf8")
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, shape (2, 6) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tensorflow as tf

@tf.keras.utils.register_keras_serializable(package='gcvit')
class Mlp(tf.keras.layers.Layer):

    def __init__(self, hidden_features=None, out_features=None, act_layer='gelu', dropout=0.0, **kwargs):
        super().__init__(**kwargs)
        self.hidden_features = hidden_features
        self.out_features = out_features
        self.act_layer = act_layer
        self.dropout = dropout

    def build(self, input_shape):
        self.in_features = input_shape[-1]
        self.hidden_features = self.hidden_features or self.in_features
        self.out_features = self.out_features or self.in_features
        self.fc1 = tf.keras.layers.Dense(self.hidden_features, name='fc1')
        self.act = tf.keras.layers.Activation(self.act_layer, name='act')
        self.fc2 = tf.keras.layers.Dense(self.out_features, name='fc2')
        self.drop1 = tf.keras.layers.Dropout(self.dropout, name='drop1')
        self.drop2 = tf.keras.layers.Dropout(self.dropout, name='drop2')
        super().build(input_shape)

    def call(self, inputs, **kwargs):
        x = self.fc1(inputs)
        x = self.act(x)
        x = self.drop1(x)
        x = self.fc2(x)
        x = self.drop2(x)
        return x

    def get_config(self):
        config = super().get_config()
        config.update({'hidden_features': self.hidden_features, 'out_features': self.out_features, 'act_layer': self.act_layer, 'dropout': self.dropout})
        return config


INIT_ARGS = {
    'hidden_features': 8,
    'out_features': 6,
    'act_layer': 'gelu',
    'dropout': 0.1,
}

ARGS = {
    'inputs': tf.random.normal((2, 4)),
}

if __name__ == '__main__':
    mlp = Mlp(**INIT_ARGS)
    output = mlp(**ARGS)
    print("Output shape:", output.shape)
    print("Output:", output)
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 2, dtype family float, shape (2, 6) — shape (2, 6) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
PatchEmbed Ran
ran on a synthesized input · constructed an object; no result was computed
nvlabs/gcvit/models/gc_vit.py
pointer only (licence: NOASSERTION) · get_code("40aaf4d47f39ab0b")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, nvlabs/gcvit (NOASSERTION). 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.

ReduceSize Ran
ran on a synthesized input · constructed an object; no result was computed
nvlabs/gcvit/models/gc_vit.py
pointer only (licence: NOASSERTION) · get_code("82b08c759c9f6ca2")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, nvlabs/gcvit (NOASSERTION). 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.

Resizing Ran
ran on a synthesized input
awsaf49/gcvit-tf/gcvit/models/gcvit.py
code served (permissive licence) · get_code("d4f0051dfe74829d")
How it ran

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

import tensorflow as tf
import numpy as np

H_AXIS = -3
W_AXIS = -2

@tf.keras.utils.register_keras_serializable(package='gcvit')
class Resizing(tf.keras.layers.Layer):

    def __init__(self, height, width, interpolation='bilinear', **kwargs):
        self.height = height
        self.width = width
        self.interpolation = interpolation
        super().__init__(**kwargs)

    def call(self, inputs):
        if self.interpolation == 'nearest':
            input_dtype = self.compute_dtype
        else:
            input_dtype = tf.float32
        inputs = tf.cast(inputs, dtype=input_dtype)
        size = [self.height, self.width]
        outputs = tf.image.resize(inputs, size=size, method=self.interpolation)
        return tf.cast(outputs, self.compute_dtype)

    def compute_output_shape(self, input_shape):
        input_shape = tf.TensorShape(input_shape).as_list()
        input_shape[H_AXIS] = self.height
        input_shape[W_AXIS] = self.width
        return tf.TensorShape(input_shape)

    def get_config(self):
        config = super().get_config()
        config.update({'height': self.height, 'width': self.width, 'interpolation': self.interpolation})
        return config


INIT_ARGS = {
    'height': 8,
    'width': 6,
    'interpolation': 'bilinear'
}

ARGS = {
    'inputs': tf.constant(np.random.randn(2, 12, 10, 3).astype(np.float32))
}

layer = Resizing(**INIT_ARGS)
output = layer(**ARGS)
print(f"Output shape: {output.shape}")
print(f"Expected shape: (2, 8, 6, 3)")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 4, dtype family float, shape (2, 8, 6, 3) — shape (2, 8, 6, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
SE Ran
ran on a synthesized input · constructed an object; no result was computed
nvlabs/gcvit/models/gc_vit.py
pointer only (licence: NOASSERTION) · get_code("c55dd199a66973af")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, nvlabs/gcvit (NOASSERTION). 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.

WindowAttention Ran
ran on a synthesized input · constructed an object; no result was computed
nvlabs/gcvit/models/gc_vit.py
pointer only (licence: NOASSERTION) · get_code("16c6d129c800a720")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, nvlabs/gcvit (NOASSERTION). 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.

WindowAttentionGlobal Ran
ran on a synthesized input · constructed an object; no result was computed
nvlabs/gcvit/models/gc_vit.py
pointer only (licence: NOASSERTION) · get_code("f7e8a124e89dc651")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, nvlabs/gcvit (NOASSERTION). 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.

_to_channel_first Ran
ran; our contract draft was wrong, not the code
nvlabs/gcvit/models/gc_vit.py
pointer only (licence: NOASSERTION) · get_code("def50b2e4eca5b7f")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, nvlabs/gcvit (NOASSERTION). 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.

_to_channel_last Ran
ran; our contract draft was wrong, not the code
nvlabs/gcvit/models/gc_vit.py
pointer only (licence: NOASSERTION) · get_code("7b49c8af2301430b")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, nvlabs/gcvit (NOASSERTION). 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.

norm_cdf Ran
ran, honoured the contract we drafted
EMalagoli92/GCViT-TensorFlow/gcvit_tensorflow/models/layers/utils.py
code served (permissive licence) · get_code("1e7a21b70e475e05")
How it ran

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

import math

def norm_cdf(x):
    """Computes standard normal cumulative distribution."""
    return (1.0 + math.erf(x / math.sqrt(2.0))) / 2.0

# The function takes a single parameter x and applies math operations to it
# x can be a float, int, or any numeric type that supports division and math.erf

ARGS = {
    "x": 0.5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
preprocess_input Ran
ran on a synthesized input
shkarupa-alex/tfgcvit/tfgcvit/prep.py
code served (permissive licence) · get_code("9cac895861c9b777")
How it ran

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

import tensorflow as tf
import numpy as np

# Create a small input tensor for image preprocessing
# Shape: (batch_size=2, height=4, width=3, channels=3) for RGB images
inputs = tf.constant(np.random.randint(0, 256, size=(2, 4, 3, 3), dtype=np.uint8), dtype=tf.float32)

# dtype parameter can be None (will use global policy) or a specific dtype
dtype = None

ARGS = {
    'inputs': inputs,
    'dtype': dtype,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
keras, numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 4, dtype family float, shape (2, 4, 3, 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
trunc_normal_ Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
EMalagoli92/GCViT-TensorFlow/gcvit_tensorflow/models/layers/utils.py
code served (permissive licence) · get_code("6fc63671bfbb6c99")
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 math

ARGS = {
    "shape": (2, 4),
    "mean": 0.0,
    "std": 1.0,
    "a": -2.0,
    "b": 2.0,
    "dtype": tf.float32,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 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
window_partition Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
nvlabs/gcvit/models/gc_vit.py
pointer only (licence: NOASSERTION) · get_code("2cba2e8141170129")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, nvlabs/gcvit (NOASSERTION). 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_partition Ran
ran on a synthesized input
EMalagoli92/GCViT-TensorFlow/gcvit_tensorflow/models/utils.py
code served (permissive licence) · get_code("4ea5c96c7699574c")
How it ran

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

# Set up a small tensor with shape (B, H, W, C)
# Using distinct sizes: B=2, H=4, W=6, C=3
# H and W must be divisible by window_size
batch_size = 2
height = 4
width = 6
channels = 3
window_size = 2

# Create a simple tensor with values in range [0, 1)
x = tf.random.uniform(shape=(batch_size, height, width, channels))

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
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 4, dtype family float, shape (12, 2, 2, 3) — shape (12, 2, 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
window_reverse Ran
ran; our contract draft was wrong, not the code
nvlabs/gcvit/models/gc_vit.py
pointer only (licence: NOASSERTION) · get_code("5adfa560a867040f")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, nvlabs/gcvit (NOASSERTION). 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.

AdaptiveAveragePooling2D Not yet run
unverified (harvested, no recorded run)
awsaf49/gcvit-tf/gcvit/models/gcvit.py
code served (permissive licence) · get_code("f8e4623ae8d47882")
How it ran

no invocation recorded.

AdaptivePooling2D Not yet run
unverified (harvested, no recorded run)
awsaf49/gcvit-tf/gcvit/models/gcvit.py
code served (permissive licence) · get_code("00abe3365641adfb")
How it ran

no invocation recorded.

FeatExtract Not yet run
unverified (harvested, no recorded run)
awsaf49/gcvit-tf/gcvit/models/gcvit.py
code served (permissive licence) · get_code("a28f69fd86465824")
How it ran

no invocation recorded.

GCViT Not yet run
unverified (harvested, no recorded run)
nvlabs/gcvit/models/gc_vit.py
pointer only (licence: NOASSERTION) · get_code("163b5911f9297e6c")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, nvlabs/gcvit (NOASSERTION). 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.

GCViT Not yet run
unverified (harvested, no recorded run)
awsaf49/gcvit-tf/gcvit/models/gcvit.py
code served (permissive licence) · get_code("1c54430c64d45728")
How it ran

no invocation recorded.

GCViTBlock Not yet run
unverified (harvested, no recorded run)
nvlabs/gcvit/models/gc_vit.py
pointer only (licence: NOASSERTION) · get_code("1ceb32009fe38260")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, nvlabs/gcvit (NOASSERTION). 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.

GCViTBlock Not yet run
unverified (harvested, no recorded run)
awsaf49/gcvit-tf/gcvit/models/gcvit.py
code served (permissive licence) · get_code("cb77b8f164a09e19")
How it ran

no invocation recorded.

GCViTLayer Not yet run
unverified (harvested, no recorded run)
nvlabs/gcvit/models/gc_vit.py
pointer only (licence: NOASSERTION) · get_code("422f8d129a49011f")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, nvlabs/gcvit (NOASSERTION). 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.

GCViTLevel Not yet run
unverified (harvested, no recorded run)
awsaf49/gcvit-tf/gcvit/models/gcvit.py
code served (permissive licence) · get_code("c45f3ff6bb9a8b4a")
How it ran

no invocation recorded.

GlobalQueryGen Not yet run
unverified (harvested, no recorded run)
awsaf49/gcvit-tf/gcvit/models/gcvit.py
code served (permissive licence) · get_code("72459b5e74464349")
How it ran

no invocation recorded.

ReduceSize Not yet run
unverified (harvested, no recorded run)
awsaf49/gcvit-tf/gcvit/models/gcvit.py
code served (permissive licence) · get_code("bacca661d0adddd1")
How it ran

no invocation recorded.

SE Not yet run
unverified (harvested, no recorded run)
awsaf49/gcvit-tf/gcvit/models/gcvit.py
code served (permissive licence) · get_code("bed567301fe24fc8")
How it ran

no invocation recorded.

Stem Not yet run
unverified (harvested, no recorded run)
awsaf49/gcvit-tf/gcvit/models/gcvit.py
code served (permissive licence) · get_code("9c9a02a583a26d70")
How it ran

no invocation recorded.

WindowAttention Not yet run
unverified (harvested, no recorded run)
awsaf49/gcvit-tf/gcvit/models/gcvit.py
code served (permissive licence) · get_code("1f2595f160725077")
How it ran

no invocation recorded.

window_reverse Not yet run
unverified (harvested, no recorded run)
EMalagoli92/GCViT-TensorFlow/gcvit_tensorflow/models/utils.py
code served (permissive licence) · get_code("e19f5e7afc48b87a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 36 samples lifted from this paper's linked repositories, 36 carry a function identity and 0 do not. Of the 36 distinct functions with an identity, 6 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 1 the same month, 4 later) and 30 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
Mlp
brick of this paper's assembly: helper
130 other papers
42 dated earlier, 1 the same month, 87 later · 114 only as an assembly brick
2003.12039 (2020-03)
RAFT: Recurrent All-Pairs Field Transforms for Optical Flow
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
2012.12877 (2020-12)
Training data-efficient image transformers & distillation through attention
and 127 more not named here
norm_cdf 3 other papers
3 dated earlier
1907.04433 (2019-07)
GluonCV and GluonNLP: Deep Learning in Computer Vision and Natural Language Processing
2103.15808 (2021-03)
CvT: Introducing Convolutions to Vision Transformers
2202.09741 (2022-02)
Visual Attention Network
_to_channel_first
brick of this paper's assembly: helper
2 other papers
2 later · 1 only as an assembly brick
2208.09703 (2022-08)
SnowFormer: Context Interaction Transformer with Scale-awareness for Single Image Desnowing
2308.14153 (2023-08)
Sparse Sampling Transformer with Uncertainty-Driven Ranking for Unified Removal of Raindrops and Rain Streaks
_to_channel_last
brick of this paper's assembly: helper
2 other papers
2 later · 1 only as an assembly brick
2208.09703 (2022-08)
SnowFormer: Context Interaction Transformer with Scale-awareness for Single Image Desnowing
2308.14153 (2023-08)
Sparse Sampling Transformer with Uncertainty-Driven Ranking for Unified Removal of Raindrops and Rain Streaks
trunc_normal_ 2 other papers
2 dated earlier
2103.15808 (2021-03)
CvT: Introducing Convolutions to Vision Transformers
2202.09741 (2022-02)
Visual Attention Network
SE
brick of this paper's assembly: helper
1 other paper
1 later
2602.11281 (2026-02)
DeepRed: an architecture for redshift estimation

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

Repositories linked to this paper

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

Abstract

We propose global context vision transformer (GC ViT), a novel architecture that enhances parameter and compute utilization for computer vision. Our method leverages global context self-attention modules, joint with standard local self-attention, to effectively and efficiently model both long and short-range spatial interactions, without the need for expensive operations such as computing attention masks or shifting local windows. In addition, we address the lack of the inductive bias in ViTs, and propose to leverage a modified fused inverted residual blocks in our architecture. Our proposed GC ViT achieves state-of-the-art results across image classification, object detection and semantic segmentation tasks. On ImageNet-1K dataset for classification, the variants of GC ViT with 51M, 90M and 201M parameters achieve 84.3%, 85.0% and 85.7% Top-1 accuracy, respectively, at 224 × 224 image resolution and without any pre-training, hence surpassing comparably-sized prior art such as CNN-based ConvNeXt and ViTbased MaxViT and Swin Transformer by a large margin. Pre-trained GC ViT backbones in downstream tasks of object detection, instance segmentation, and semantic segmentation using MS COCO and ADE20K datasets outperform prior work consistently. Specifically, GC ViT with a 4scale DINO detection head achieves a box AP of 58.3% on MS COCO dataset. Code is available at https://github.com/NVlabs/GCViT.

For agents

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

get_harvested_code_for_paper("2206.09959")
get_code_for_paper("2206.09959")
have("2206.09959")

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

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

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

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

Connect an agent — have() is free.