| BaseError |
Ran ran on a synthesized input · constructed an object; no result was computed |
alibaba/EasyCV/easycv/models/detection/detectors/detr/detr_transformer.py code served (permissive licence) · get_code("6f3e4e43ff039081") How it ranRan 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, BaseError: 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
# Define a stand-in Operation class since the docstring references ops.Operation
class Operation:
def __init__(self, name="test_op"):
self.name = name
def __str__(self):
return f"Operation({self.name})"
# Construct arguments for BaseError.__init__
# Parameters: message, details, op
ARGS = {
'message': 'An error occurred during operation execution',
'details': 'This is a detailed help message to handle the error',
'op': Operation(name='matrix_multiply')
}
- 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 BaseError — 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 BaseError 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
|
| BottleNeck |
Ran ran on a synthesized input · constructed an object; no result was computed |
Leonardo-Blanger/detr_tensorflow/detr_tensorflow/models/detr.py code served (permissive licence) · get_code("166ac89882b932d6") How it ranRan 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, BottleNeck: 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 numpy as np
# Set seed for reproducibility
np.random.seed(0)
tf.random.set_seed(0)
# Create a small input tensor for testing
# Shape: (batch_size=2, height=8, width=8, channels=3)
input_tensor = tf.constant(
np.random.randn(2, 8, 8, 3).astype(np.float32)
)
ARGS = {
'dim1': 16, # intermediate dimension for conv2
'dim2': 32, # output dimension for conv3
'strides': 1, # stride for conv2
'dilation': 1, # dilation rate for padding and conv2
'downsample': True, # whether to apply downsampling
}
- 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 BottleNeck — 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 BottleNeck 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
|
| BottleNeck |
Ran ran on a synthesized input · constructed an object; no result was computed |
Visual-Behavior/detr-tensorflow/detr_tf/networks/detr.py code served (permissive licence) · get_code("3a7615caf1c19859") How it ranRan 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, BottleNeck: 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 numpy as np
# Set seed for reproducibility
np.random.seed(0)
tf.random.set_seed(0)
ARGS = {
'dim1': 64,
'dim2': 256,
'strides': 1,
'dilation': 1,
'downsample': False,
}
- 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 BottleNeck — 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 BottleNeck 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
|
| ConvBlock |
Ran ran on a synthesized input · constructed an object; no result was computed |
clive819/Modified-DETR/models/detr.py pointer only (licence: NONE) · get_code("e7741ce58fdf0670") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, clive819/Modified-DETR 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. |
| DETR |
Ran ran on a synthesized input · constructed an object; no result was computed |
DataXujing/TensorRT-DETR/model/detr.py code served (permissive licence) · get_code("a08f693477433cf5") How it ranRan 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, DETR: 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 Optional
torch.manual_seed(0)
# Create a minimal backbone
class MinimalBackbone(nn.Module):
def __init__(self):
super().__init__()
self.num_channels = 3
self.layer = nn.Conv2d(3, 64, kernel_size=7, stride=2, padding=3)
def forward(self, x):
return self.layer(x)
# Create a minimal transformer
class MinimalTransformer(nn.Module):
def __init__(self, d_model=64):
super().__init__()
self.d_model = d_model
self.encoder_layer = nn.TransformerEncoderLayer(
d_model=d_model,
nhead=4,
dim_feedforward=256,
batch_first=True
)
self.decoder_layer = nn.TransformerDecoderLayer(
d_model=d_model,
nhead=4,
dim_feedforward=256,
batch_first=True
)
def forward(self, src, mask, query_embed, pos):
# Simple transformer forward pass
return src
# Create NestedTensor for input
class NestedTensor:
def __init__(self, tensors, mask: Optional[torch.Tensor]):
self.tensors = tensors
self.mask = mask
def to(self, device):
cast_tensor = self.tensors.to(device)
cast_mask = self.mask.to(device) if self.mask is not None else None
return NestedTensor(cast_tensor, cast_mask)
def decompose(self):
return (self.tensors, self.mask)
# Create sample nested tensor input
# Batch size 2, 3 channels, height 8, width 8
batch_size = 2
img_tensor = torch.randn(batch_size, 3, 8, 8)
img_mask = torch.zeros(batch_size, 8, 8, dtype=torch.bool)
samples = NestedTensor(img_tensor, img_mask)
# Instantiate backbone and transformer
backbone = MinimalBackbone()
transformer = MinimalTransformer(d_model=64)
ARGS = {
'backbone': backbone,
'transformer': transformer,
'num_classes': 91,
'num_queries': 100,
'aux_loss': False,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type DETR — 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 DETR 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
|
| DecoderLayer |
Ran ran on a synthesized input · constructed an object; no result was computed |
Leonardo-Blanger/detr_tensorflow/detr_tensorflow/models/detr.py code served (permissive licence) · get_code("af5a7f149644b25e") How it ranRan 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, DecoderLayer: 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 numpy as np
# Set random seed for reproducibility
tf.random.set_seed(0)
np.random.seed(0)
# Create the ARGS dictionary with all parameters for DecoderLayer
ARGS = {
'model_dim': 256,
'num_heads': 8,
'dim_feedforward': 2048,
'dropout': 0.1,
'activation': 'relu',
'normalize_before': False,
}
- 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 DecoderLayer — 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 DecoderLayer 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
|
| DecoderLayer |
Ran ran on a synthesized input · constructed an object; no result was computed |
pranavjadhav001/detr_keras/detr/detr.py code served (permissive licence) · get_code("915b67b9468a4470") How it ranRan 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, DecoderLayer: 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
from tensorflow.keras import layers
from tensorflow import keras
import numpy as np
# Define the DecoderLayer class
class DecoderLayer(layers.Layer):
def __init__(self, num_heads, key_dim, feature_dim, ff_dim, dropout):
super().__init__()
self.multiheadatt1 = layers.MultiHeadAttention(num_heads=num_heads, key_dim=key_dim, dropout=dropout)
self.multiheadatt2 = layers.MultiHeadAttention(num_heads=num_heads, key_dim=key_dim, dropout=dropout)
self.feed_forward_layer = keras.Sequential([layers.Dense(ff_dim, activation='relu'), layers.Dense(feature_dim)])
self.layernorm1 = layers.LayerNormalization(epsilon=1e-05)
self.layernorm2 = layers.LayerNormalization(epsilon=1e-05)
self.layernorm3 = layers.LayerNormalization(epsilon=1e-05)
self.dropout1 = layers.Dropout(dropout)
self.dropout2 = layers.Dropout(dropout)
self.dropout3 = layers.Dropout(dropout)
def call(self, input, query_pos, pos_embeddings, encoder_outputs, training, look_ahead_mask=None, padding_mask=None):
query = key = input + query_pos
attention_output1 = self.multiheadatt1(query=query, key=key, value=input, attention_mask=look_ahead_mask)
input += self.dropout1(attention_output1, training=training)
input = self.layernorm1(input)
query = input + query_pos
key = encoder_outputs + pos_embeddings
attention_output2 = self.multiheadatt2(value=encoder_outputs, key=key, query=query, attention_mask=padding_mask)
input += self.dropout2(attention_output2, training=training)
input = self.layernorm2(input)
ffn_output = self.feed_forward_layer(input)
input += self.dropout3(ffn_output, training=training)
input = self.layernorm3(input)
return input
# Create tiny test tensors
batch_size = 2
seq_len = 3
feature_dim = 4
num_heads = 2
key_dim = 2
ff_dim = 8
# Initialize layer
decoder_layer = DecoderLayer(
num_heads=num_heads,
key_dim=key_dim,
feature_dim=feature_dim,
ff_dim=ff_dim,
dropout=0.1
)
# Build the layer by calling it once with test data
input_tensor = tf.random.normal((batch_size, seq_len, feature_dim))
query_pos_tensor = tf.random.normal((batch_size, seq_len, feature_dim))
pos_embeddings_tensor = tf.random.normal((batch_size, seq_len, feature_dim))
encoder_outputs_tensor = tf.random.normal((batch_size, seq_len, feature_dim))
# Build layer
decoder_layer(
input=input_tensor,
query_pos=query_pos_tensor,
pos_embeddings=pos_embeddings_tensor,
encoder_outputs=encoder_outputs_tensor,
training=False
)
ARGS = {
"num_heads": num_heads,
"key_dim": key_dim,
"feature_dim": feature_dim,
"ff_dim": ff_dim,
"dropout": 0.1
}
- 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 DecoderLayer — 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 DecoderLayer 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
|
| DeformableDETR |
Ran ran on a synthesized input · constructed an object; no result was computed |
Li-ai-cell/Interpretation_DETR/models/deformable_detr.py code served (permissive licence) · get_code("6e9d22c76a65085c") How it ranRan 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, DeformableDETR: 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
import math
import copy
from typing import Optional, List
torch.manual_seed(0)
class SimpleBackbone(nn.Module):
def __init__(self):
super().__init__()
self.strides = [8, 16, 32]
self.num_channels = [64, 128, 256]
self.conv1 = nn.Conv2d(3, 64, 7, stride=2, padding=3)
self.conv2 = nn.Conv2d(64, 128, 3, stride=2, padding=1)
self.conv3 = nn.Conv2d(128, 256, 3, stride=2, padding=1)
def forward(self, x):
x1 = torch.relu(self.conv1(x))
x2 = torch.relu(self.conv2(x1))
x3 = torch.relu(self.conv3(x2))
return [x1, x2, x3]
class SimpleTransformer(nn.Module):
def __init__(self, d_model=256, nhead=8, num_encoder_layers=6, num_decoder_layers=6):
super().__init__()
self.d_model = d_model
self.nhead = nhead
encoder_layer = nn.TransformerEncoderLayer(
d_model=d_model,
nhead=nhead,
dim_feedforward=512,
batch_first=True,
norm_first=True
)
self.encoder = nn.TransformerEncoder(encoder_layer, num_layers=num_encoder_layers)
decoder_layer = nn.TransformerDecoderLayer(
d_model=d_model,
nhead=nhead,
dim_feedforward=512,
batch_first=True,
norm_first=True
)
self.decoder = nn.TransformerDecoder(decoder_layer, num_layers=num_decoder_layers)
def forward(self, src, query_embed, pos_embed):
memory = self.encoder(src)
hs = self.decoder(query_embed, memory)
return hs
backbone = SimpleBackbone()
transformer = SimpleTransformer(d_model=256, nhead=8, num_encoder_layers=3, num_decoder_layers=3)
ARGS = {
"backbone": backbone,
"transformer": transformer,
"num_classes": 91,
"num_queries": 100,
"num_feature_levels": 3,
"aux_loss": True,
"with_box_refine": False,
"two_stage": False,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type DeformableDETR — 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 DeformableDETR 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
|
| DenseBlock |
Ran ran on a synthesized input · constructed an object; no result was computed |
clive819/Modified-DETR/models/detr.py pointer only (licence: NONE) · get_code("dc4458eeece80ec3") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, clive819/Modified-DETR 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. |
| DenseNet |
Ran ran on a synthesized input |
clive819/Modified-DETR/models/detr.py pointer only (licence: NONE) · get_code("2a3f28612aea2e52") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, clive819/Modified-DETR 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. |
| Encoder |
Ran ran on a synthesized input · constructed an object; no result was computed |
pranavjadhav001/detr_keras/detr/detr.py code served (permissive licence) · get_code("afa0a513d38b46bc") How it ranRan 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, Encoder: 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 numpy as np
# Set seed for reproducibility
np.random.seed(0)
tf.random.set_seed(0)
# Create small tensors with distinct dimensions
batch_size = 2
sequence_length = 8
feature_dim = 4
ff_dim = 6
# Create input tensor: (batch_size, sequence_length, feature_dim)
inputs = tf.constant(np.random.randn(batch_size, sequence_length, feature_dim).astype(np.float32))
# Create positional embeddings: (batch_size, sequence_length, feature_dim)
pos_embeddings = tf.constant(np.random.randn(batch_size, sequence_length, feature_dim).astype(np.float32))
# Create padding mask (optional, can be None or a mask tensor)
# Shape: (batch_size, 1, 1, sequence_length) for attention mask broadcasting
padding_mask = None
# Define Encoder parameters
num_encoder = 2
num_heads = 2
key_dim = 4
dropout = 0.1
ARGS = {
'num_encoder': num_encoder,
'num_heads': num_heads,
'key_dim': key_dim,
'feature_dim': feature_dim,
'ff_dim': ff_dim,
'dropout': dropout,
}
- 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 Encoder — 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 Encoder 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
|
| EncoderLayer |
Ran ran on a synthesized input · constructed an object; no result was computed |
Leonardo-Blanger/detr_tensorflow/detr_tensorflow/models/detr.py code served (permissive licence) · get_code("e386b72d977ac828") How it ranRan 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, EncoderLayer: 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 numpy as np
# Set seed for reproducibility
tf.random.set_seed(0)
np.random.seed(0)
# The EncoderLayer __init__ signature based on the code shown:
# def __init__(self, model_dim=256, num_heads=8, dim_feedforward=2048, dropout=0.1, activation='relu', normalize_before=False, **kwargs)
ARGS = {
'model_dim': 8,
'num_heads': 2,
'dim_feedforward': 16,
'dropout': 0.1,
'activation': 'relu',
'normalize_before': False,
}
- 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 EncoderLayer — 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 EncoderLayer 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
|
| EncoderLayer |
Ran ran on a synthesized input · constructed an object; no result was computed |
pranavjadhav001/detr_keras/detr/detr.py code served (permissive licence) · get_code("2aa3afdcd66d8888") How it ranRan 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, EncoderLayer: 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 numpy as np
# Set seed for reproducibility
tf.random.set_seed(0)
np.random.seed(0)
# Define the arguments dict for EncoderLayer
ARGS = {
'num_heads': 2,
'key_dim': 4,
'feature_dim': 8,
'ff_dim': 16,
'dropout': 0.1
}
# Build the layer to verify it works
encoder_layer = tf.keras.layers.Layer.__new__(
type('EncoderLayer', (tf.keras.layers.Layer,), {
'__init__': lambda self, num_heads, key_dim, feature_dim, ff_dim, dropout: (
super(type(self), self).__init__(),
setattr(self, 'multiheadatt', tf.keras.layers.MultiHeadAttention(num_heads=num_heads, key_dim=key_dim, dropout=dropout)),
setattr(self, 'feed_forward_layer', tf.keras.Sequential([
tf.keras.layers.Dense(ff_dim, activation='relu'),
tf.keras.layers.Dense(feature_dim)
])),
setattr(self, 'layernorm1', tf.keras.layers.LayerNormalization(epsilon=1e-06)),
setattr(self, 'layernorm2', tf.keras.layers.LayerNormalization(epsilon=1e-06)),
setattr(self, 'dropout1', tf.keras.layers.Dropout(dropout)),
setattr(self, 'dropout2', tf.keras.layers.Dropout(dropout))
),
'call': lambda self, input, pos_embeddings=None, training=False, attention_mask=None: input
})
)
# Create sample tensors for testing the call signature
batch_size = 2
seq_length = 3
feature_dim = ARGS['feature_dim']
input_tensor = tf.random.normal((batch_size, seq_length, feature_dim))
pos_embeddings = tf.random.normal((batch_size, seq_length, feature_dim))
ARGS
- 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 EncoderLayer — 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 EncoderLayer 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
|
| FixedEmbedding |
Ran ran on a synthesized input · constructed an object; no result was computed |
Leonardo-Blanger/detr_tensorflow/detr_tensorflow/models/detr.py code served (permissive licence) · get_code("ec7f81ffdbd55a8d") How it ranRan 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, FixedEmbedding: 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
# FixedEmbedding takes embed_shape as a required parameter and **kwargs for Layer options
# embed_shape should be a tuple/list representing the shape of the embedding weight matrix
# The call method doesn't use the x parameter, so it can be None or any value
ARGS = {
'embed_shape': (4, 3), # Small embedding matrix: 4 rows, 3 columns
}
- 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 FixedEmbedding — 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 FixedEmbedding 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
|
| FixedEmbedding |
Ran ran on a synthesized input · constructed an object; no result was computed |
Visual-Behavior/detr-tensorflow/detr_tf/networks/detr.py code served (permissive licence) · get_code("14483127db755736") How it ranRan 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, FixedEmbedding: 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
# FixedEmbedding takes embed_shape and **kwargs
# embed_shape is used as the shape parameter for add_weight in build()
# **kwargs are passed to the parent Layer class
# Define the arguments
ARGS = {
'embed_shape': (4, 3), # Small embedding shape: vocab_size=4, embedding_dim=3
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type FixedEmbedding — 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 FixedEmbedding 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
|
| HungarianMatcher |
Ran ran on a synthesized input |
marcusnerva/hmn/models/hungary.py code served (permissive licence) · get_code("cc9bf980c4abd872") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned list. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
from torch import nn, Tensor
from scipy.optimize import linear_sum_assignment
class HungarianMatcher(nn.Module):
"""This class computes an assignment between the targets and the predictions of the network
For efficiency reasons, the targets don't include the no_object. Because of this, in general,
there are more predictions than targets. In this case, we do a 1-to-1 matching of the best predictions,
while the others are un-matched (and thus treated as non-objects).
"""
def __init__(self):
super(HungarianMatcher, self).__init__()
self.eps = 1e-06
@torch.no_grad()
def forward(self, salient_objects: Tensor, nouns_dict_list: list):
""" Performs the matching
Args:
salient_objects: (bsz, max_objects, word_dim)
nouns_dict_list: List[{'vec': nouns_vec, 'nouns': nouns}, ...]
Returns:
A list of size batch_size, containing tuples of (index_i, index_j) where:
- index_i is the indices of the selected predictions (in order)
- index_j is the indices of the corresponding selected targets (in order)
For each batch element, it holds:
len(index_i) = len(index_j) = min(num_queries, num_target_boxes)
"""
bsz, max_objects = salient_objects.shape[:2]
device = salient_objects.device
sizes = [len(item['nouns']) for item in nouns_dict_list]
nouns_semantics = torch.cat([item['vec'][:len(item['nouns'])] for item in nouns_dict_list]).to(device)
nouns_length = torch.norm(nouns_semantics, dim=-1, keepdim=True)
salient_objects = salient_objects.flatten(0, 1)
salient_length = torch.norm(salient_objects, dim=-1, keepdim=True)
matrix_length = salient_length * nouns_length.permute([1, 0]) + self.eps
cos_matrix = torch.mm(salient_objects, nouns_semantics.permute([1, 0]))
cos_matrix = -cos_matrix / matrix_length
cos_matrix = cos_matrix.view([bsz, max_objects, -1])
indices = [linear_sum_assignment(c[i].detach().cpu().numpy()) for i, c in enumerate(cos_matrix.split(sizes, -1))]
return [(torch.as_tensor(i, dtype=torch.int64), torch.as_tensor(j, dtype=torch.int64)) for i, j in indices]
INIT_ARGS = {}
ARGS = {
'salient_objects': torch.randn(2, 5, 4),
'nouns_dict_list': [
{
'vec': torch.randn(3, 4),
'nouns': ['cat', 'dog', 'bird']
},
{
'vec': torch.randn(2, 4),
'nouns': ['tree', 'house']
}
]
}
matcher = HungarianMatcher()
result = matcher(**ARGS)
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- Imports
- scipy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list — a list output has no array shape of its own; none is stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| Joiner |
Ran ran on a synthesized input · constructed an object; no result was computed |
clive819/Modified-DETR/models/detr.py pointer only (licence: NONE) · get_code("516138a354d8a8b6") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, clive819/Modified-DETR 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. |
| KeyError |
Ran ran on a synthesized input · constructed an object; no result was computed |
alibaba/EasyCV/easycv/models/detection/detectors/detr/detr_transformer.py code served (permissive licence) · get_code("cd97bea208feabb0") How it ranRan 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, KeyError: 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)
# Stand-in Operation class for the op parameter
class Operation:
def __init__(self, name="test_op"):
self.name = name
def __str__(self):
return f"Operation({self.name})"
# Construct arguments for KeyError instantiation
ARGS = {
'message': 'Key "user_id" not found in dictionary',
'details': 'Please ensure the key exists before accessing it',
'op': Operation(name="dict_lookup")
}
- 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 KeyError — 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 KeyError output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| Linear |
Ran ran on a synthesized input · constructed an object; no result was computed |
Leonardo-Blanger/detr_tensorflow/detr_tensorflow/models/detr.py code served (permissive licence) · get_code("c8278aeb1cd2c753") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, Linear: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import tensorflow as tf
import numpy as np
# Create a simple input tensor for testing
# Shape: (batch_size=2, input_dim=4)
test_input = tf.constant(np.random.randn(2, 4).astype(np.float32))
# The Linear layer constructor takes output_dim as the main parameter
output_dim = 3
ARGS = {
'output_dim': output_dim
}
- 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 Linear — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Linear output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| Linear |
Ran ran on a synthesized input · constructed an object; no result was computed |
Visual-Behavior/detr-tensorflow/detr_tf/networks/detr.py code served (permissive licence) · get_code("b1d65c380b6c2141") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, Linear: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import tensorflow as tf
import numpy as np
# Create a small input tensor with batch_size=2, input_dim=4
input_data = tf.constant(np.random.randn(2, 4).astype(np.float32))
# Define the output dimension as a distinct value
output_dim = 3
# Create the ARGS dictionary with all parameters for Linear.__init__
ARGS = {
'output_dim': output_dim,
}
- 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 Linear — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Linear output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| MLP |
Ran ran on a synthesized input · constructed an object; no result was computed |
clive819/Modified-DETR/models/detr.py pointer only (licence: NONE) · get_code("3465a25340dd9ced") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, clive819/Modified-DETR when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded. |
| MLP |
Ran ran on a synthesized input · constructed an object; no result was computed |
Li-ai-cell/Interpretation_DETR/models/deformable_detr.py code served (permissive licence) · get_code("38f2143f420f7378") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, MLP: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
torch.manual_seed(0)
ARGS = {
"input_dim": 4,
"hidden_dim": 8,
"output_dim": 3,
"num_layers": 2,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type MLP — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MLP output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| MLP |
Ran ran on a synthesized input · constructed an object; no result was computed |
alibaba/EasyCV/easycv/models/detection/detectors/detr/detr_transformer.py code served (permissive licence) · get_code("61eefc8cd1d96134") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, MLP: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
torch.manual_seed(0)
ARGS = {
"input_dim": 4,
"hidden_dim": 8,
"output_dim": 3,
"num_layers": 2
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type MLP — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MLP output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| MultiHeadAttention |
Ran ran on a synthesized input · constructed an object; no result was computed |
Leonardo-Blanger/detr_tensorflow/detr_tensorflow/models/detr.py code served (permissive licence) · get_code("d81ff048a53b3958") How it ranRan 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, MultiHeadAttention: 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 numpy as np
# Set random seed for reproducibility
tf.random.set_seed(0)
np.random.seed(0)
# Create the MultiHeadAttention layer
model_dim = 8
num_heads = 2
dropout_rate = 0.1
# Create a layer instance
mha_layer = tf.keras.layers.Layer()
# Build dummy inputs with shape (seq_len, batch_size, model_dim)
# Using distinct dimensions: seq_len=5, batch_size=2, model_dim=8
seq_len_query = 5
seq_len_key = 6
batch_size = 2
query = tf.random.normal((seq_len_query, batch_size, model_dim), dtype=tf.float32)
key = tf.random.normal((seq_len_key, batch_size, model_dim), dtype=tf.float32)
value = tf.random.normal((seq_len_key, batch_size, model_dim), dtype=tf.float32)
# Create optional masks
# attn_mask: shape (target_len, source_len) or (batch_size*num_heads, target_len, source_len)
attn_mask = tf.zeros((seq_len_query, seq_len_key), dtype=tf.float32)
# key_padding_mask: shape (batch_size, source_len) with boolean values
key_padding_mask = tf.constant([[False, False, False, False, False, False],
[False, False, False, False, False, False]], dtype=tf.bool)
ARGS = {
'model_dim': model_dim,
'num_heads': num_heads,
'dropout': dropout_rate,
}
# Additional call arguments (for reference, though not part of __init__)
CALL_ARGS = {
'inputs': [query, key, value],
'attn_mask': attn_mask,
'key_padding_mask': key_padding_mask,
'need_weights': True,
'training': False,
}
- 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 MultiHeadAttention — 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 MultiHeadAttention 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
|
| MultiHeadAttention |
Ran ran on a synthesized input · constructed an object; no result was computed |
Visual-Behavior/detr-tensorflow/detr_tf/networks/detr.py code served (permissive licence) · get_code("595c977770d20ea9") How it ranRan 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, MultiHeadAttention: 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 numpy as np
# Set random seed for reproducibility
np.random.seed(0)
tf.random.set_seed(0)
# Create a small MultiHeadAttention layer
model_dim = 8
num_heads = 2
dropout_rate = 0.1
# Create the layer
attention_layer = tf.keras.layers.Layer()
# Create small tensors for query, key, value
# Shape: (seq_len, batch_size, model_dim)
seq_len_q = 3
seq_len_kv = 4
batch_size = 2
query = tf.random.normal((seq_len_q, batch_size, model_dim), dtype=tf.float32)
key = tf.random.normal((seq_len_kv, batch_size, model_dim), dtype=tf.float32)
value = tf.random.normal((seq_len_kv, batch_size, model_dim), dtype=tf.float32)
# Create attention mask (optional)
attn_mask = tf.zeros((batch_size * num_heads, seq_len_q, seq_len_kv), dtype=tf.float32)
# Create key padding mask (optional)
key_padding_mask = tf.constant([[False, False, False, False],
[False, False, True, True]], dtype=tf.bool)
ARGS = {
'model_dim': model_dim,
'num_heads': num_heads,
'dropout': dropout_rate,
}
- 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 MultiHeadAttention — 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 MultiHeadAttention 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
|
| NestedTensor |
Ran ran on a synthesized input · constructed an object; no result was computed |
Li-ai-cell/Interpretation_DETR/models/deformable_detr.py code served (permissive licence) · get_code("b3bc5ccabebb6be8") How it ranRan 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, NestedTensor: 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 Tensor
import torch.nn as nn
torch.manual_seed(0)
# Construct tensors for NestedTensor
# Using distinct sizes: batch=2, feature_dim=4, spatial_h=3, spatial_w=5
tensors = torch.randn(2, 4, 3, 5)
mask = torch.ones(2, 3, 5, dtype=torch.bool)
ARGS = {
"tensors": tensors,
"mask": mask,
}
- 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 NestedTensor — 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 NestedTensor 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
|
| PositionEmbeddingSine |
Ran ran on a synthesized input · constructed an object; no result was computed |
Leonardo-Blanger/detr_tensorflow/detr_tensorflow/models/detr.py code served (permissive licence) · get_code("30bbae6bd017a72b") How it ranRan 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, PositionEmbeddingSine: 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 numpy as np
# Create a small mask tensor for testing
# Shape: (batch_size=2, height=4, width=3)
# mask is a boolean tensor where True means "masked" position
mask = tf.constant([
[[True, False, False],
[False, True, False],
[False, False, True],
[True, True, False]],
[[False, False, True],
[True, False, False],
[False, True, False],
[False, False, False]]
], dtype=tf.bool)
ARGS = {
'num_pos_features': 64,
'temperature': 10000,
'normalize': False,
'scale': None,
'eps': 1e-06,
}
- 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 PositionEmbeddingSine — 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 PositionEmbeddingSine 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
|
| PositionEmbeddingSine |
Ran ran on a synthesized input · constructed an object; no result was computed |
clive819/Modified-DETR/models/detr.py pointer only (licence: NONE) · get_code("3f7df5ae93d75f73") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, clive819/Modified-DETR 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. |
| Registry |
Ran ran on a synthesized input · constructed an object; no result was computed |
alibaba/EasyCV/easycv/models/detection/detectors/detr/detr_transformer.py code served (permissive licence) · get_code("c9a86343969e354f") How it ranRan 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, Registry: 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 functools import partial
# Set seed for reproducibility
torch.manual_seed(0)
# Create a minimal nn.Module for testing
class SimpleModule(nn.Module):
def __init__(self):
super(SimpleModule, self).__init__()
self.linear = nn.Linear(4, 3)
def forward(self, x):
return self.linear(x)
# Define ARGS dict with all parameters for Registry.__init__
ARGS = {
'name': 'test_registry'
}
- 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 Registry — 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 Registry 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
|
| ResNet50Backbone |
Ran ran on a synthesized input · constructed an object; no result was computed |
Leonardo-Blanger/detr_tensorflow/detr_tensorflow/models/detr.py code served (permissive licence) · get_code("4ccf2425db7e2edf") How it ranRan 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, ResNet50Backbone: 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 numpy as np
# Define the ARGS dictionary with all parameters for ResNet50Backbone
ARGS = {
'replace_stride_with_dilation': [False, False, False],
}
- 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 ResNet50Backbone — 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 ResNet50Backbone 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
|
| ResNet50Backbone |
Ran ran on a synthesized input · constructed an object; no result was computed |
Visual-Behavior/detr-tensorflow/detr_tf/networks/detr.py code served (permissive licence) · get_code("f6fb3cc7cc9b79c8") How it ranRan 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, ResNet50Backbone: 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 numpy as np
# Define ARGS dictionary with parameters for ResNet50Backbone
ARGS = {
'replace_stride_with_dilation': [False, False, False],
}
- 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 ResNet50Backbone — 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 ResNet50Backbone 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
|
| ResNetBase |
Ran ran on a synthesized input · constructed an object; no result was computed |
Leonardo-Blanger/detr_tensorflow/detr_tensorflow/models/detr.py code served (permissive licence) · get_code("4d5b0985a478ce49") How it ranRan 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, ResNetBase: 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 numpy as np
# Build the ResNetBase model with required layer1-4 attributes
class DummyResidualBlock(tf.keras.layers.Layer):
"""Minimal residual block that accepts and returns tensors"""
def __init__(self, name=None, **kwargs):
super().__init__(name=name, **kwargs)
def call(self, x):
return x
class ResNetBaseWithLayers(tf.keras.Model):
"""Extended ResNetBase with layer1-4 attributes"""
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.pad1 = tf.keras.layers.ZeroPadding2D(3, name='pad1')
self.conv1 = tf.keras.layers.Conv2D(64, kernel_size=7, strides=2, padding='valid', use_bias=False, name='conv1')
self.bn1 = FrozenBatchNorm2D(name='bn1')
self.relu = tf.keras.layers.ReLU(name='relu')
self.pad2 = tf.keras.layers.ZeroPadding2D(1, name='pad2')
self.maxpool = tf.keras.layers.MaxPool2D(pool_size=3, strides=2, padding='valid')
# Add required layers
self.layer1 = DummyResidualBlock(name='layer1')
self.layer2 = DummyResidualBlock(name='layer2')
self.layer3 = DummyResidualBlock(name='layer3')
self.layer4 = DummyResidualBlock(name='layer4')
def call(self, x):
x = self.pad1(x)
x = self.conv1(x)
x = self.bn1(x)
x = self.relu(x)
x = self.pad2(x)
x = self.maxpool(x)
x = self.layer1(x)
x = self.layer2(x)
x = self.layer3(x)
x = self.layer4(x)
return x
class FrozenBatchNorm2D(tf.keras.layers.Layer):
def __init__(self, eps=1e-05, **kwargs):
super().__init__(**kwargs)
self.eps = eps
def build(self, input_shape):
self.weight = self.add_weight(name='weight', shape=[input_shape[-1]], initializer='zeros', trainable=False)
self.bias = self.add_weight(name='bias', shape=[input_shape[-1]], initializer='zeros', trainable=False)
self.running_mean = self.add_weight(name='running_mean', shape=[input_shape[-1]], initializer='zeros', trainable=False)
self.running_var = self.add_weight(name='running_var', shape=[input_shape[-1]], initializer='ones', trainable=False)
def call(self, x):
scale = self.weight * tf.math.rsqrt(self.running_var + self.eps)
shift = self.bias - self.running_mean * scale
return x * scale + shift
def compute_output_shape(self, input_shape):
return input_shape
# Create a small input tensor (batch=2, height=4, width=3, channels=5)
input_tensor = tf.constant(np.random.randn(2, 4, 3, 5).astype(np.float32))
# Construct ARGS dict
ARGS = {}
- 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 ResNetBase — 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 ResNetBase 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
|
| ResNetBase |
Ran ran on a synthesized input · constructed an object; no result was computed |
Visual-Behavior/detr-tensorflow/detr_tf/networks/detr.py code served (permissive licence) · get_code("03e8c57dd4bc7e84") How it ranRan 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, ResNetBase: 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 numpy as np
# Define the missing layer1, layer2, layer3, layer4 as simple identity-like layers
class DummyLayer(tf.keras.layers.Layer):
def __init__(self, **kwargs):
super().__init__(**kwargs)
def call(self, x):
return x
# Create a minimal ResNetBase instance with the required layer attributes
class ResNetBaseComplete(tf.keras.Model):
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.pad1 = tf.keras.layers.ZeroPadding2D(3, name='pad1')
self.conv1 = tf.keras.layers.Conv2D(64, kernel_size=7, strides=2, padding='valid', use_bias=False, name='conv1')
class FrozenBatchNorm2D(tf.keras.layers.Layer):
def __init__(self, eps=1e-05, **kwargs):
super().__init__(**kwargs)
self.eps = eps
def build(self, input_shape):
self.weight = self.add_weight(name='weight', shape=[input_shape[-1]], initializer=tf.keras.initializers.GlorotUniform(), trainable=False)
self.bias = self.add_weight(name='bias', shape=[input_shape[-1]], initializer=tf.keras.initializers.GlorotUniform(), trainable=False)
self.running_mean = self.add_weight(name='running_mean', shape=[input_shape[-1]], initializer='zeros', trainable=False)
self.running_var = self.add_weight(name='running_var', shape=[input_shape[-1]], initializer='ones', trainable=False)
def call(self, x):
scale = self.weight * tf.math.rsqrt(self.running_var + self.eps)
shift = self.bias - self.running_mean * scale
return x * scale + shift
def compute_output_shape(self, input_shape):
return input_shape
self.bn1 = FrozenBatchNorm2D(name='bn1')
self.relu = tf.keras.layers.ReLU(name='relu')
self.pad2 = tf.keras.layers.ZeroPadding2D(1, name='pad2')
self.maxpool = tf.keras.layers.MaxPool2D(pool_size=3, strides=2, padding='valid')
self.layer1 = DummyLayer()
self.layer2 = DummyLayer()
self.layer3 = DummyLayer()
self.layer4 = DummyLayer()
def call(self, x):
x = self.pad1(x)
x = self.conv1(x)
x = self.bn1(x)
x = self.relu(x)
x = self.pad2(x)
x = self.maxpool(x)
x = self.layer1(x)
x = self.layer2(x)
x = self.layer3(x)
x = self.layer4(x)
return x
# Create input tensor
input_tensor = tf.random.normal((2, 224, 224, 3))
# Create model instance
model = ResNetBaseComplete()
# Build the model by calling it once
_ = model(input_tensor)
ARGS = {}
- 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 ResNetBase — 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 ResNetBase 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
|
| ResidualBlock |
Ran ran on a synthesized input · constructed an object; no result was computed |
Leonardo-Blanger/detr_tensorflow/detr_tensorflow/models/detr.py code served (permissive licence) · get_code("71f64d952481419d") How it ranRan 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, ResidualBlock: 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 numpy as np
# Define FrozenBatchNorm2D and BottleNeck classes (copied from function)
class FrozenBatchNorm2D(tf.keras.layers.Layer):
def __init__(self, eps=1e-05, **kwargs):
super().__init__(**kwargs)
self.eps = eps
def build(self, input_shape):
self.weight = self.add_weight(name='weight', shape=[input_shape[-1]], initializer='zeros', trainable=False)
self.bias = self.add_weight(name='bias', shape=[input_shape[-1]], initializer='zeros', trainable=False)
self.running_mean = self.add_weight(name='running_mean', shape=[input_shape[-1]], initializer='zeros', trainable=False)
self.running_var = self.add_weight(name='running_var', shape=[input_shape[-1]], initializer='ones', trainable=False)
def call(self, x):
scale = self.weight * tf.math.rsqrt(self.running_var + self.eps)
shift = self.bias - self.running_mean * scale
return x * scale + shift
def compute_output_shape(self, input_shape):
return input_shape
class BottleNeck(tf.keras.Model):
def __init__(self, dim1, dim2, strides=1, dilation=1, downsample=False, **kwargs):
super().__init__(**kwargs)
self.downsample = downsample
self.pad = tf.keras.layers.ZeroPadding2D(dilation)
self.relu = tf.keras.layers.ReLU(name='relu')
self.conv1 = tf.keras.layers.Conv2D(dim1, kernel_size=1, use_bias=False, name='conv1')
self.bn1 = FrozenBatchNorm2D(name='bn1')
self.conv2 = tf.keras.layers.Conv2D(dim1, kernel_size=3, strides=strides, dilation_rate=dilation, use_bias=False, name='conv2')
self.bn2 = FrozenBatchNorm2D(name='bn2')
self.conv3 = tf.keras.layers.Conv2D(dim2, kernel_size=1, use_bias=False, name='conv3')
self.bn3 = FrozenBatchNorm2D(name='bn3')
self.downsample_conv = tf.keras.layers.Conv2D(dim2, kernel_size=1, strides=strides, use_bias=False, name='downsample_0')
self.downsample_bn = FrozenBatchNorm2D(name='downsample_1')
def call(self, x):
identity = x
out = self.conv1(x)
out = self.bn1(out)
out = self.relu(out)
out = self.pad(out)
out = self.conv2(out)
out = self.bn2(out)
out = self.relu(out)
out = self.conv3(out)
out = self.bn3(out)
if self.downsample:
identity = self.downsample_bn(self.downsample_conv(x))
out += identity
out = self.relu(out)
return out
class ResidualBlock(tf.keras.Model):
def __init__(self, num_bottlenecks, dim1, dim2, strides=1, replace_stride_with_dilation=False, **kwargs):
super().__init__(**kwargs)
if replace_stride_with_dilation:
strides = 1
dilation = 2
else:
dilation = 1
self.bottlenecks = [BottleNeck(dim1, dim2, strides=strides, downsample=True, name='0')]
for idx in range(1, num_bottlenecks):
self.bottlenecks.append(BottleNeck(dim1, dim2, name=str(idx), dilation=dilation))
def call(self, x):
for btn in self.bottlenecks:
x = btn(x)
return x
# Create test input tensor
test_input = tf.random.normal((2, 16, 16, 4))
# Define ARGS
ARGS = {
'num_bottlenecks': 2,
'dim1': 8,
'dim2': 16,
'strides': 1,
'replace_stride_with_dilation': False,
}
- 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 ResidualBlock — 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 ResidualBlock 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
|
| ResidualBlock |
Ran ran on a synthesized input · constructed an object; no result was computed |
Visual-Behavior/detr-tensorflow/detr_tf/networks/detr.py code served (permissive licence) · get_code("4530f047f9d8c2a8") How it ranRan 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, ResidualBlock: 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 numpy as np
# Define FrozenBatchNorm2D and BottleNeck classes as they are used by ResidualBlock
class FrozenBatchNorm2D(tf.keras.layers.Layer):
def __init__(self, eps=1e-05, **kwargs):
super().__init__(**kwargs)
self.eps = eps
def build(self, input_shape):
self.weight = self.add_weight(name='weight', shape=[input_shape[-1]], initializer=tf.keras.initializers.GlorotUniform(), trainable=False)
self.bias = self.add_weight(name='bias', shape=[input_shape[-1]], initializer=tf.keras.initializers.GlorotUniform(), trainable=False)
self.running_mean = self.add_weight(name='running_mean', shape=[input_shape[-1]], initializer='zeros', trainable=False)
self.running_var = self.add_weight(name='running_var', shape=[input_shape[-1]], initializer='ones', trainable=False)
def call(self, x):
scale = self.weight * tf.math.rsqrt(self.running_var + self.eps)
shift = self.bias - self.running_mean * scale
return x * scale + shift
def compute_output_shape(self, input_shape):
return input_shape
class BottleNeck(tf.keras.Model):
def __init__(self, dim1, dim2, strides=1, dilation=1, downsample=False, **kwargs):
super().__init__(**kwargs)
self.downsample = downsample
self.pad = tf.keras.layers.ZeroPadding2D(dilation)
self.relu = tf.keras.layers.ReLU(name='relu')
self.conv1 = tf.keras.layers.Conv2D(dim1, kernel_size=1, use_bias=False, name='conv1')
self.bn1 = FrozenBatchNorm2D(name='bn1')
self.conv2 = tf.keras.layers.Conv2D(dim1, kernel_size=3, strides=strides, dilation_rate=dilation, use_bias=False, name='conv2')
self.bn2 = FrozenBatchNorm2D(name='bn2')
self.conv3 = tf.keras.layers.Conv2D(dim2, kernel_size=1, use_bias=False, name='conv3')
self.bn3 = FrozenBatchNorm2D(name='bn3')
self.downsample_conv = tf.keras.layers.Conv2D(dim2, kernel_size=1, strides=strides, use_bias=False, name='downsample_0')
self.downsample_bn = FrozenBatchNorm2D(name='downsample_1')
def call(self, x):
identity = x
out = self.conv1(x)
out = self.bn1(out)
out = self.relu(out)
out = self.pad(out)
out = self.conv2(out)
out = self.bn2(out)
out = self.relu(out)
out = self.conv3(out)
out = self.bn3(out)
if self.downsample:
identity = self.downsample_bn(self.downsample_conv(x))
out += identity
out = self.relu(out)
return out
class ResidualBlock(tf.keras.Model):
def __init__(self, num_bottlenecks, dim1, dim2, strides=1, replace_stride_with_dilation=False, **kwargs):
super().__init__(**kwargs)
if replace_stride_with_dilation:
strides = 1
dilation = 2
else:
dilation = 1
self.bottlenecks = [BottleNeck(dim1, dim2, strides=strides, downsample=True, name='0')]
for idx in range(1, num_bottlenecks):
self.bottlenecks.append(BottleNeck(dim1, dim2, name=str(idx), dilation=dilation))
def call(self, x):
for btn in self.bottlenecks:
x = btn(x)
return x
# Create input tensor for testing
input_tensor = tf.random.normal((2, 16, 16, 3))
# Define ARGS dictionary with all parameters for ResidualBlock
ARGS = {
'num_bottlenecks': 3,
'dim1': 4,
'dim2': 8,
'strides': 1,
'replace_stride_with_dilation': False,
}
- 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 ResidualBlock — 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 ResidualBlock 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
|
| RuntimeError |
Ran ran on a synthesized input · constructed an object; no result was computed |
alibaba/EasyCV/easycv/models/detection/detectors/detr/detr_transformer.py code served (permissive licence) · get_code("871157f97c91d2cb") How it ranRan 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, RuntimeError: 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
class Operation:
"""Stand-in class for ops.Operation"""
def __init__(self, name):
self.name = name
def __str__(self):
return f"Operation({self.name})"
ARGS = {
'message': 'An internal runtime error occurred',
'details': 'This error occurred due to an unexpected system state',
'op': Operation('sample_op')
}
- 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 RuntimeError — 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 RuntimeError 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
|
| SinePositionalEncoding |
Ran ran on a synthesized input |
alibaba/EasyCV/easycv/models/detection/detectors/detr/detr_transformer.py code served (permissive licence) · get_code("a47d44d68f6ee645") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 4, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import math
import torch
from torch import Tensor, nn
class SinePositionalEncoding(nn.Module):
"""Position encoding with sine and cosine functions.
See `End-to-End Object Detection with Transformers
<https://arxiv.org/pdf/2005.12872>`_ for details.
Args:
num_feats (int): The feature dimension for each position
along x-axis or y-axis. Note the final returned dimension
for each position is 2 times of this value.
temperature (int, optional): The temperature used for scaling
the position embedding. Defaults to 10000.
normalize (bool, optional): Whether to normalize the position
embedding. Defaults to False.
scale (float, optional): A scale factor that scales the position
embedding. The scale will be used only when `normalize` is True.
Defaults to 2*pi.
eps (float, optional): A value added to the denominator for
numerical stability. Defaults to 1e-6.
offset (float): offset add to embed when do the normalization.
Defaults to 0.
"""
def __init__(self, num_feats, temperature=10000, normalize=False, scale=2 * math.pi, eps=1e-06, offset=0.0):
super().__init__()
if normalize:
assert isinstance(scale, (float, int)), f'when normalize is set,scale should be provided and in float or int type, found {type(scale)}'
self.num_feats = num_feats
self.temperature = temperature
self.normalize = normalize
self.scale = scale
self.eps = eps
self.offset = offset
def forward(self, mask):
"""Forward function for `SinePositionalEncoding`.
Args:
mask (Tensor): ByteTensor mask. Non-zero values representing
ignored positions, while zero values means valid positions
for this image. Shape [bs, h, w].
Returns:
pos (Tensor): Returned position embedding with shape
[bs, num_feats*2, h, w].
"""
mask = mask.to(torch.int)
not_mask = 1 - mask
y_embed = not_mask.cumsum(1, dtype=torch.float32)
x_embed = not_mask.cumsum(2, dtype=torch.float32)
if self.normalize:
y_embed = (y_embed + self.offset) / (y_embed[:, -1:, :] + self.eps) * self.scale
x_embed = (x_embed + self.offset) / (x_embed[:, :, -1:] + self.eps) * self.scale
dim_t = torch.arange(self.num_feats, dtype=torch.float32, device=mask.device)
dim_t = self.temperature ** (2 * (dim_t // 2) / self.num_feats)
pos_x = x_embed[:, :, :, None] / dim_t
pos_y = y_embed[:, :, :, None] / dim_t
B, H, W = mask.size()
pos_x = torch.stack((pos_x[:, :, :, 0::2].sin(), pos_x[:, :, :, 1::2].cos()), dim=4).view(B, H, W, -1)
pos_y = torch.stack((pos_y[:, :, :, 0::2].sin(), pos_y[:, :, :, 1::2].cos()), dim=4).view(B, H, W, -1)
pos = torch.cat((pos_y, pos_x), dim=3).permute(0, 3, 1, 2)
return pos
INIT_ARGS = {
'num_feats': 64,
'temperature': 10000,
'normalize': True,
'scale': 2 * math.pi,
'eps': 1e-6,
'offset': 0.0
}
ARGS = {
'mask': torch.zeros(2, 8, 12, dtype=torch.float32)
}
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Tensor, ndim 4, dtype family float — 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)
|
| Transformer |
Ran ran on a synthesized input · constructed an object; no result was computed |
clive819/Modified-DETR/models/detr.py pointer only (licence: NONE) · get_code("e7754ceb0d3ebd3f") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, clive819/Modified-DETR 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. |
| TransformerDecoder |
Ran ran on a synthesized input · constructed an object; no result was computed |
clive819/Modified-DETR/models/detr.py pointer only (licence: NONE) · get_code("015ab94ccd1059d4") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, clive819/Modified-DETR 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. |
| TransformerDecoder |
Ran ran on a synthesized input · constructed an object; no result was computed |
alibaba/EasyCV/easycv/models/detection/detectors/detr/detr_transformer.py code served (permissive licence) · get_code("ee78371dbc19ce86") How it ranRan 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, TransformerDecoder: 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
import copy
torch.manual_seed(0)
# Create a minimal decoder layer that accepts the expected arguments
class MinimalDecoderLayer(nn.Module):
def __init__(self, d_model=4):
super().__init__()
self.linear = nn.Linear(d_model, d_model)
def forward(self, tgt, memory, tgt_mask=None, memory_mask=None,
tgt_key_padding_mask=None, memory_key_padding_mask=None,
pos=None, query_pos=None):
# Just pass through with a linear transformation
return self.linear(tgt)
# Create a minimal norm layer
class MinimalNorm(nn.Module):
def __init__(self, d_model=4):
super().__init__()
self.layer_norm = nn.LayerNorm(d_model)
def forward(self, x):
return self.layer_norm(x)
# Build small tensors
batch_size = 2
seq_len = 3
d_model = 4
memory_seq_len = 5
tgt = torch.randn(seq_len, batch_size, d_model)
memory = torch.randn(memory_seq_len, batch_size, d_model)
tgt_mask = torch.zeros(seq_len, seq_len, dtype=torch.bool)
memory_mask = torch.zeros(seq_len, memory_seq_len, dtype=torch.bool)
tgt_key_padding_mask = torch.zeros(batch_size, seq_len, dtype=torch.bool)
memory_key_padding_mask = torch.zeros(batch_size, memory_seq_len, dtype=torch.bool)
pos = torch.randn(memory_seq_len, batch_size, d_model)
query_pos = torch.randn(seq_len, batch_size, d_model)
decoder_layer = MinimalDecoderLayer(d_model=d_model)
num_layers = 2
norm = MinimalNorm(d_model=d_model)
ARGS = {
"decoder_layer": decoder_layer,
"num_layers": num_layers,
"norm": norm,
"return_intermediate": False
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type TransformerDecoder — 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 TransformerDecoder 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
|
| TransformerDecoderLayer |
Ran ran on a synthesized input · constructed an object; no result was computed |
clive819/Modified-DETR/models/detr.py pointer only (licence: NONE) · get_code("e6df50cb4054a21d") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, clive819/Modified-DETR 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. |
| TransformerDecoderLayer |
Ran ran on a synthesized input · constructed an object; no result was computed |
alibaba/EasyCV/easycv/models/detection/detectors/detr/detr_transformer.py code served (permissive licence) · get_code("9c120638dc644120") How it ranRan 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, TransformerDecoderLayer: 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 Optional
torch.manual_seed(0)
# Small tensor dimensions for testing
batch_size = 2
seq_len = 3
d_model = 4
nhead = 2
dim_feedforward = 8
# Create sample tensors
tgt = torch.randn(seq_len, batch_size, d_model)
memory = torch.randn(seq_len, batch_size, d_model)
query_pos = torch.randn(seq_len, batch_size, d_model)
pos = torch.randn(seq_len, batch_size, d_model)
# Optional masks and padding masks (None or tensors)
tgt_mask = None
memory_mask = None
tgt_key_padding_mask = None
memory_key_padding_mask = None
# Construct the ARGS dictionary with all parameters for TransformerDecoderLayer.__init__
ARGS = {
'd_model': d_model,
'nhead': nhead,
'dim_feedforward': dim_feedforward,
'dropout': 0.1,
'activation': 'relu',
'normalize_before': False
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type TransformerDecoderLayer — 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 TransformerDecoderLayer 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
|
| TransformerEncoder |
Ran ran on a synthesized input · constructed an object; no result was computed |
clive819/Modified-DETR/models/detr.py pointer only (licence: NONE) · get_code("6085c3edb73b1432") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, clive819/Modified-DETR 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. |
| TransformerEncoder |
Ran ran on a synthesized input · constructed an object; no result was computed |
alibaba/EasyCV/easycv/models/detection/detectors/detr/detr_transformer.py code served (permissive licence) · get_code("8a4db2ad3894b67c") How it ranRan 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, TransformerEncoder: 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 Optional
torch.manual_seed(0)
# Build a minimal encoder layer that matches the expected interface
class SimpleEncoderLayer(nn.Module):
def __init__(self, d_model=256):
super().__init__()
self.d_model = d_model
self.linear = nn.Linear(d_model, d_model)
def forward(self, src, src_mask=None, src_key_padding_mask=None, pos=None):
# The layer accepts src, src_mask, src_key_padding_mask, and pos
# It processes src and optionally uses pos
output = self.linear(src)
if pos is not None:
output = output + pos
return output
# Create the encoder layer instance
encoder_layer = SimpleEncoderLayer(d_model=256)
# Create a simple normalization layer
norm_layer = nn.LayerNorm(256)
# Create small tensors for testing
batch_size = 2
seq_len = 3
d_model = 256
src = torch.randn(seq_len, batch_size, d_model)
mask = None # Optional
src_key_padding_mask = None # Optional
pos = torch.randn(seq_len, batch_size, d_model)
ARGS = {
"encoder_layer": encoder_layer,
"num_layers": 2,
"norm": norm_layer,
"d_model": 256,
"query_scale_type": None
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type TransformerEncoder — 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 TransformerEncoder 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
|
| TransformerEncoderLayer |
Ran ran on a synthesized input · constructed an object; no result was computed |
clive819/Modified-DETR/models/detr.py pointer only (licence: NONE) · get_code("3e3613a79dc6d21d") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, clive819/Modified-DETR 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. |
| TransformerEncoderLayer |
Ran ran on a synthesized input · constructed an object; no result was computed |
alibaba/EasyCV/easycv/models/detection/detectors/detr/detr_transformer.py code served (permissive licence) · get_code("526d67b8881712d6") How it ranRan 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, TransformerEncoderLayer: 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)
# Create tiny tensors for forward pass
# src: (seq_len, batch_size, d_model)
seq_len = 3
batch_size = 2
d_model = 4
nhead = 2
dim_feedforward = 8
src = torch.randn(seq_len, batch_size, d_model)
src_mask = None # Optional, can be None
src_key_padding_mask = None # Optional, can be None
pos = torch.randn(seq_len, batch_size, d_model) # Optional positional embeddings
ARGS = {
'd_model': d_model,
'nhead': nhead,
'dim_feedforward': dim_feedforward,
'dropout': 0.1,
'activation': 'relu',
'normalize_before': False,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type TransformerEncoderLayer — 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 TransformerEncoderLayer 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
|
| TransitionLayer |
Ran ran on a synthesized input · constructed an object; no result was computed |
clive819/Modified-DETR/models/detr.py pointer only (licence: NONE) · get_code("8cf47b464bc0f064") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, clive819/Modified-DETR 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. |
| TypeError |
Ran ran on a synthesized input · constructed an object; no result was computed |
alibaba/EasyCV/easycv/models/detection/detectors/detr/detr_transformer.py code served (permissive licence) · get_code("b1bd1c1bd350e556") How it ranRan 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, TypeError: 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
# The TypeError class inherits from BaseError and uses the following parameters:
# - message: str (used in __str__ via self.message property)
# - details: str or None (used in __str__ via self.details property)
# - op: Operation or None (used in __str__ via self.op property)
# Create a minimal stand-in Operation class since the docstring mentions ops.Operation
class Operation:
def __str__(self):
return "test_operation"
# Construct valid arguments
ARGS = {
'message': 'Type mismatch in tensor operation',
'details': 'Expected tensor of type float32, got int64',
'op': Operation()
}
- 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 TypeError — 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 TypeError 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_activation_fn |
Ran ran; our contract draft was wrong, not the code |
alibaba/EasyCV/easycv/models/detection/detectors/detr/detr_transformer.py code served (permissive licence) · get_code("184de768ec89ba57") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned function. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn.functional as F
from torch import nn
torch.manual_seed(0)
# The function _get_activation_fn takes a single parameter: activation (a string)
# It returns an activation function based on the string value
# Valid inputs are: 'relu', 'gelu', 'glu', 'prelu', 'selu'
# Invalid inputs raise RuntimeError
ARGS = {
'activation': 'relu'
}
- 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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| _get_clones |
Ran ran; our contract draft was wrong, not the code |
Li-ai-cell/Interpretation_DETR/models/deformable_detr.py code served (permissive licence) · get_code("2987ca2d1c68e0cd") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned ModuleList. 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
import copy
torch.manual_seed(0)
# Create a simple nn.Module to use as the module parameter
class SimpleModule(nn.Module):
def __init__(self):
super().__init__()
self.linear = nn.Linear(4, 3)
def forward(self, x):
return self.linear(x)
# Instantiate the module
module = SimpleModule()
# Define N as the number of clones to create
N = 5
# Construct the ARGS dictionary
ARGS = {
"module": module,
"N": N
}
- 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 ModuleList — a ModuleList output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ModuleList 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
|
| _get_clones |
Ran ran; our contract draft was wrong, not the code |
alibaba/EasyCV/easycv/models/detection/detectors/detr/detr_transformer.py code served (permissive licence) · get_code("a044a67f7fbc0842") How it ranRan 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 ModuleList. 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
import copy
torch.manual_seed(0)
# Create a simple nn.Module to use as the module parameter
class SimpleModule(nn.Module):
def __init__(self):
super().__init__()
self.linear = nn.Linear(4, 3)
def forward(self, x):
return self.linear(x)
# Create instances of the module
module = SimpleModule()
# Define arguments for _get_clones
ARGS = {
"module": module,
"N": 5,
"layer_share": False
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ModuleList — a ModuleList output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ModuleList 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
|
| area_box_grad |
Ran ran on a synthesized input |
LKLQQ/detr/src/grad_ops.py code served (permissive licence) · get_code("439ca3d20ddd3507") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
# Create a small box array with shape (2, 4)
# Each row represents a box with 4 coordinates
box = np.array([
[10.0, 20.0, 30.0, 40.0],
[5.0, 15.0, 25.0, 35.0]
], dtype=np.float32)
ARGS = {
"box": box
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ndarray, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| box_cxcywh_to_xyxy |
Ran ran on a synthesized input |
LKLQQ/detr/src/box_ops.py code served (permissive licence) · get_code("074307e51146fa09") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
def box_cxcywh_to_xyxy(x):
"""box cxcywh to xyxy"""
x_c, y_c, w, h = np.array_split(x, 4, axis=-1)
b = [x_c - 0.5 * w, y_c - 0.5 * h, x_c + 0.5 * w, y_c + 0.5 * h]
return np.stack(b, axis=-1).squeeze(-2)
# Create a small input array with shape (2, 4) - batch of 2, 4 values (cx, cy, w, h)
x = np.array([
[10.0, 20.0, 4.0, 6.0],
[30.0, 40.0, 8.0, 10.0]
], dtype=np.float32)
ARGS = {
"x": x
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ndarray, ndim 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
|
| box_xyxy_to_cxcywh |
Ran ran on a synthesized input |
LKLQQ/detr/src/box_ops.py code served (permissive licence) · get_code("dbb0d0f90ff599c4") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family float, shape (1, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
# The function expects x to be a numpy array that can be transposed and split
# It should have shape (1, 4) based on the final [0] indexing
# xyxy format: [x0, y0, x1, y1] for bounding boxes
x = np.array([[10.0, 20.0, 50.0, 80.0]]) # shape (1, 4): one box in xyxy format
ARGS = {
"x": x
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ndarray, ndim 2, dtype family float, shape (1, 4) — shape (1, 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
|
| box_xyxy_to_xywh |
Ran ran on a synthesized input |
LKLQQ/detr/src/box_ops.py code served (permissive licence) · get_code("c7dc3cdd056cc5f7") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family float, shape (1, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
# Create a sample boxes array in xyxy format
# Shape: (1, 4) where each row is [xmin, ymin, xmax, ymax]
boxes = np.array([[10.0, 20.0, 50.0, 80.0]])
ARGS = {
"boxes": boxes
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ndarray, ndim 2, dtype family float, shape (1, 4) — shape (1, 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
|
| buildBackbone |
Ran ran; our contract draft was wrong, not the code |
clive819/Modified-DETR/models/detr.py pointer only (licence: NONE) · get_code("85412aff426c3960") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, clive819/Modified-DETR 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. |
| cxcywh2xyxy |
Ran ran, honoured the contract we drafted |
Leonardo-Blanger/detr_tensorflow/detr_tensorflow/models/detr.py code served (permissive licence) · get_code("51f528c6568ec2bc") How it ranRan 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
# Create a small tensor with shape (2, 4) representing 2 bounding boxes in cxcywh format
# (center_x, center_y, width, height)
boxes = tf.constant([
[50.0, 50.0, 20.0, 30.0],
[100.0, 100.0, 40.0, 50.0]
], dtype=tf.float32)
ARGS = {
"boxes": boxes
}
- 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
|
| dice_loss |
Ran ran, violated the contract we drafted |
facebookresearch/detr/models/segmentation.py pointer only (licence: Apache-2.0) · get_code("ac8fe530cdad4d8c") How it ranThe body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, facebookresearch/detr, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded. |
| getClones |
Ran ran; our contract draft was wrong, not the code |
clive819/Modified-DETR/models/detr.py pointer only (licence: NONE) · get_code("e2883ab685be2301") How it ranThe body of this sample is withheld: GitHub detected no licence in this paper's repository, clive819/Modified-DETR 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. |
| grad_xywh_to_cxcy |
Ran ran on a synthesized input |
LKLQQ/detr/src/grad_ops.py code served (permissive licence) · get_code("b825001fb2f9656b") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import numpy as np
# Create a small test array with shape (2, 4)
# The function expects an array where:
# - arr[:, 0] is x
# - arr[:, 1] is y
# - arr[:, 2] is w (width)
# - arr[:, 3] is h (height)
arr = np.array([
[10.0, 20.0, 30.0, 40.0],
[5.0, 15.0, 25.0, 35.0]
], dtype=np.float32)
ARGS = {
"arr": arr
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ndarray, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|