SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1805.08318 · 2018

Self-Attention Generative Adversarial Networks

arXiv · PDF · Open in the Atlas

Code that ran

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

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1805.08318.json · badge: /api/ran/1805.08318.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
brain-research/self-attention-gan canonical (classifier label)
classifier basis: census
1 ran · 7 no recorded run
ilyakava/gan community (classifier label)
classifier basis not recorded on the link
11 ran · 7 no recorded run
voletiv/self-attention-GAN-pytorch community (classifier label)
classifier basis not recorded on the link
6 ran · 0 no recorded run
akanimax/attn_gan_pytorch community (classifier label)
classifier basis not recorded on the link
5 ran · 2 no recorded run
alfagao/DeOldify community (classifier label)
classifier basis not recorded on the link
4 ran · 10 no recorded run
Atmosphere-art/Self-Attention-GAN community (classifier label)
classifier basis not recorded on the link
4 ran · 0 no recorded run
rosinality/sagan-pytorch reimplementation (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
kpandey008/SAGAN community (classifier label)
classifier basis not recorded on the link
2 ran · 0 no recorded run
rahulkulhalli/ISIC2019 community (classifier label)
classifier basis not recorded on the link
2 ran · 0 no recorded run
vijishmadhavan/SkinDeep community (classifier label)
classifier basis not recorded on the link
2 ran · 0 no recorded run
IEWbgfnYDwHRoRRSKtkdyMDUzgdwuBYgDKtDJWd/doldy community (classifier label)
classifier basis not recorded on the link
1 ran · 2 no recorded run
ChristophReich1996/Semantic_Pyramid_for_Image_Generation extension (classifier label)
classifier basis: classifier_2025
1 ran · 1 no recorded run
sdoria/SimpleSelfAttention reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 1 no recorded run
jantic/DeOldify community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
hiyouga/SAGAN-PyTorch community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
taki0112/Self-Attention-GAN-Tensorflow community (classifier label)
classifier basis not recorded on the link
0 ran · 4 no recorded run
Soldie/DeOldify-colorir-imagens-antigas community (classifier label)
classifier basis not recorded on the link
0 ran · 1 no recorded run
FunctionStatusWhere it lives
accuracy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ChristophReich1996/Semantic_Pyramid_for_Image_Generation/vgg_16_train.py
code served (permissive licence) · get_code("18badd533b52adb3")
How it ran

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

import torch

torch.manual_seed(0)

# Create a batch of 2 samples with 5 classes
batch_size = 2
num_classes = 5

# output: model predictions (logits) - shape (batch_size, num_classes)
output = torch.randn(batch_size, num_classes)

# target: ground truth class indices - shape (batch_size,)
target = torch.tensor([1, 3])

# topk: tuple of k values for which to compute precision@k
topk = (1, 3)

ARGS = {
    'output': output,
    'target': target,
    'topk': topk
}
Setup block drafted by
a language model, Claude Sonnet 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 list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
configure_device Ran
ran on a synthesized input
kpandey008/SAGAN/config.py
code served (permissive licence) · get_code("d0dbc1ec9e12116f")
How it ran

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

import torch

torch.manual_seed(0)

ARGS = {
    'device': 'cpu'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
conv Ran
ran; our contract draft was wrong, not the code
sdoria/SimpleSelfAttention/xresnet.py
code served (permissive licence) · get_code("c9a6012d7fbd67dd")
How it ran

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

import torch
import torch.nn as nn

torch.manual_seed(0)

# The function conv creates a Conv2d layer
# Parameters:
# - ni: number of input channels (int)
# - nf: number of output/filter channels (int)
# - ks: kernel size (int, default=3)
# - stride: stride (int, default=1)
# - bias: whether to use bias (bool, default=False)

ARGS = {
    'ni': 3,
    'nf': 16,
    'ks': 3,
    'stride': 1,
    'bias': False
}
Setup block drafted by
a language model, Claude Sonnet 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 Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
cut_model Ran
ran on a synthesized input
alfagao/DeOldify/fastai/model.py
code served (permissive licence) · get_code("3ef87d02964ebff2")
How it ran

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

import torch
import torch.nn as nn

torch.manual_seed(0)

# Build a simple model with multiple children layers
m = nn.Sequential(
    nn.Linear(4, 3),
    nn.ReLU(),
    nn.Linear(3, 2),
    nn.Sigmoid()
)

# Test different cut values
# cut=0 should return [m] (the whole model)
# cut=2 should return the first 2 children
# cut=4 should return all 4 children

ARGS = {
    "m": m,
    "cut": 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 list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
denorm Ran
ran; our contract draft was wrong, not the code
voletiv/self-attention-GAN-pytorch/utils.py
code served (permissive licence) · get_code("6e16337c88174e00")
How it ran

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

import torch

torch.manual_seed(0)

# The function denorm takes a tensor x, applies (x + 1) / 2, and clamps to [0, 1]
# We need to provide a tensor that works with these operations

x = torch.randn(2, 4)

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

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

import torch

torch.manual_seed(0)

# The function denorm takes a single parameter 'x' which is used with:
# - addition (+1)
# - division (/2)
# - .clip(0, 1) method
# This indicates x should be a torch.Tensor

x = torch.randn(2, 4)

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

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

import tensorflow as tf
import numpy as np

# Create a small input tensor for downsampling
# Shape: [batch, height, width, channels] = [2, 4, 4, 3]
# This is a valid NHWC format tensor for tf.nn.avg_pool
x = tf.constant(
    np.random.randn(2, 4, 4, 3).astype(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, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 4, dtype family float, shape (2, 2, 2, 3) — shape (2, 2, 2, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
find_classes Ran
ran; our contract draft was wrong, not the code
Atmosphere-art/Self-Attention-GAN/dataset.py
code served (permissive licence) · get_code("a991cda315bdf446")
How it ran

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

import os
import tempfile
import shutil

# Create a temporary directory with some class subdirectories
temp_dir = tempfile.mkdtemp()
os.makedirs(os.path.join(temp_dir, "class_a"), exist_ok=True)
os.makedirs(os.path.join(temp_dir, "class_b"), exist_ok=True)
os.makedirs(os.path.join(temp_dir, "class_c"), exist_ok=True)

ARGS = {
    "dir": temp_dir,
    "classes_idx": None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
generate_random_filename Ran
ran on a synthesized input
IEWbgfnYDwHRoRRSKtkdyMDUzgdwuBYgDKtDJWd/doldy/app_utils.py
code served (permissive licence) · get_code("0da8e3611f2915d1")
How it ran

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

import os
from uuid import uuid4
import tempfile

# Create a temporary directory for testing
upload_directory = tempfile.gettempdir()

# Define extension as a string
extension = "txt"

# Construct ARGS dictionary with all parameters
ARGS = {
    "upload_directory": upload_directory,
    "extension": extension
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_act_fn Ran
ran on a synthesized input
akanimax/attn_gan_pytorch/attn_gan_pytorch/Utils.py
code served (permissive licence) · get_code("07bea8a5df5a9e59")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ReLU. 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 as th
import torch.nn as nn

th.manual_seed(0)

# The function takes a string parameter fn_name and returns a PyTorch activation function
# It supports: tanh, sigmoid, relu, and lrelu (with optional negative slope parameter)

ARGS = {
    'fn_name': '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 ReLU — a ReLU output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ReLU 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_data_loader Ran
ran on a synthesized input
akanimax/attn_gan_pytorch/samples/data_processing/DataLoader.py
code served (permissive licence) · get_code("4c285e4ad37fd444")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned DataLoader. 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.utils.data import Dataset

torch.manual_seed(0)

class DummyF2TDataset(Dataset):
    """Minimal F2T-like dataset for testing"""
    def __init__(self, num_samples=4):
        self.num_samples = num_samples
    
    def __len__(self):
        return self.num_samples
    
    def __getitem__(self, idx):
        # Return a tuple of (input, target) as expected by DataLoader
        x = torch.randn(4)
        y = torch.randn(3)
        return (x, y)

dataset = DummyF2TDataset(num_samples=4)
batch_size = 2
num_workers = 0

ARGS = {
    "dataset": dataset,
    "batch_size": batch_size,
    "num_workers": num_workers
}
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 DataLoader — a DataLoader output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataLoader 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_dataloaders Ran
ran on a synthesized input
rahulkulhalli/ISIC2019/utils.py
code served (permissive licence) · get_code("ad810d34df32ec81")
How it ran

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

import torch
import torch.nn as nn
from torchvision import datasets, transforms
import tempfile
import os
from PIL import Image

torch.manual_seed(0)

# Create temporary directories with minimal image structure
temp_train_dir = tempfile.mkdtemp()
temp_test_dir = tempfile.mkdtemp()

# Create class subdirectories
train_class_dir = os.path.join(temp_train_dir, "class0")
test_class_dir = os.path.join(temp_test_dir, "class0")
os.makedirs(train_class_dir, exist_ok=True)
os.makedirs(test_class_dir, exist_ok=True)

# Create minimal dummy images (3-channel RGB, small size)
def create_dummy_image(path):
    img = Image.new('RGB', (300, 300), color=(73, 109, 137))
    img.save(path)

# Create a few dummy images in train directory
for i in range(2):
    create_dummy_image(os.path.join(train_class_dir, f"img_{i}.jpg"))

# Create a few dummy images in test directory
for i in range(2):
    create_dummy_image(os.path.join(test_class_dir, f"img_{i}.jpg"))

ARGS = {
    "train_root": temp_train_dir,
    "test_root": temp_test_dir,
    "batch_size": 2,
    "shuffle_data": True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_trainable_variables Ran
ran, honoured the contract we drafted
ilyakava/gan/tensorflow_gan/python/contrib_utils.py
code served (permissive licence) · get_code("49e2b0cc4b0c854f")
How it ran

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

import tensorflow as tf

# Enable eager execution and v1 compatibility mode
tf.compat.v1.disable_eager_execution()

# Create a simple TensorFlow graph with some variables
with tf.compat.v1.Graph().as_default():
    with tf.compat.v1.variable_scope("model"):
        # Create some variables in different scopes
        var1 = tf.compat.v1.get_variable("weight", shape=[4, 3], dtype=tf.float32)
        var2 = tf.compat.v1.get_variable("bias", shape=[3], dtype=tf.float32)
    
    with tf.compat.v1.variable_scope("optimizer"):
        var3 = tf.compat.v1.get_variable("learning_rate", shape=[1], dtype=tf.float32)
    
    # Create a session to initialize variables
    with tf.compat.v1.Session() as sess:
        sess.run(tf.compat.v1.global_variables_initializer())

# Define arguments for get_trainable_variables function
ARGS = {
    "scope": None,
    "suffix": None,
}
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 list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_transform Ran
ran on a synthesized input
akanimax/attn_gan_pytorch/samples/data_processing/DataLoader.py
code served (permissive licence) · get_code("e36470391de100a1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Compose. 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 torchvision.transforms import ToTensor, Normalize, Compose, Resize

torch.manual_seed(0)

# The function get_transform takes one optional parameter: new_size
# new_size should be either None or a tuple/int representing the size for Resize transform
# The function uses new_size to conditionally create a transform pipeline

# Test with new_size as a tuple (common for Resize)
new_size_value = (64, 64)

ARGS = {
    "new_size": new_size_value
}
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 Compose — a Compose output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Compose 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_variables_by_name Ran
ran, honoured the contract we drafted
ilyakava/gan/tensorflow_gan/python/contrib_utils.py
code served (permissive licence) · get_code("bfe05de19b4eb8d1")
How it ran

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

import tensorflow as tf

# Enable TensorFlow 1.x compatibility mode
tf.compat.v1.disable_eager_execution()

# Create a TensorFlow graph and session for variable creation
graph = tf.compat.v1.Graph()
with graph.as_default():
    # Create some test variables in different scopes
    with tf.compat.v1.variable_scope("scope1"):
        var1 = tf.compat.v1.get_variable("my_var", shape=[2, 3])
        var2 = tf.compat.v1.get_variable("other_var", shape=[4, 5])
    
    with tf.compat.v1.variable_scope("scope2"):
        var3 = tf.compat.v1.get_variable("my_var", shape=[3, 4])

# Define arguments for get_variables_by_name function
ARGS = {
    "given_name": "my_var",
    "scope": "scope1"
}
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 list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_watermarked Ran
ran on a synthesized input
jantic/DeOldify/deoldify/visualize.py
code served (permissive licence) · get_code("456672524c536ea3")
How it ran

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

import numpy as np
from PIL import Image

# Create a small test image as PIL Image
# Using a small 100x100 RGB image
test_array = np.random.randint(0, 256, (100, 100, 3), dtype=np.uint8)
pil_image = Image.fromarray(test_array, mode='RGB')

ARGS = {
    'pil_image': pil_image
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
image_grid Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ilyakava/gan/tensorflow_gan/python/eval/eval_utils.py
code served (permissive licence) · get_code("c2576a700c35ebba")
How it ran

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

import tensorflow as tf
import numpy as np

# Create a 4D tensor input: batch_size=6, height=32, width=32, channels=3
# Grid shape is [2, 3] so we need 2*3=6 images
batch_size = 6
height = 32
width = 32
num_channels = 3

input_tensor = tf.constant(
    np.random.rand(batch_size, height, width, num_channels).astype(np.float32)
)

grid_shape = [2, 3]
image_shape = [32, 32]

ARGS = {
    'input_tensor': input_tensor,
    'grid_shape': grid_shape,
    'image_shape': image_shape,
    'num_channels': num_channels,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 4, dtype family float, shape (1, 64, 96, 3) — shape (1, 64, 96, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
is_image_file Ran
ran, violated the contract we drafted
Atmosphere-art/Self-Attention-GAN/dataset.py
pointer only (licence: MIT); the stored copy get_code serves, from ermongroup/fairgen, is pointer only (licence: NONE) · get_code("4e6a8faaf8e44abe")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from ermongroup/fairgen, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

is_listy Ran
ran on a synthesized input
alfagao/DeOldify/fastai/core.py
code served (permissive licence) · get_code("41ffbd7edb63900f")
How it ran

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

import torch
import numpy as np

def is_listy(x):
    return isinstance(x, (list, tuple))

# Test with a list
test_list = [1, 2, 3]
ARGS = {"x": test_list}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
kl_divergence Ran
ran; our contract draft was wrong, not the code
ilyakava/gan/tensorflow_gan/python/eval/classifier_metrics.py
code served (permissive licence) · get_code("a3e29c3eb31126b7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned SymbolicTensor. 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)

# Create small tensors with distinct dimensions
batch_size = 2
num_classes = 4

# p: 2-D floating-point Tensor (batch_size x num_classes)
# Should be a valid probability distribution (sums to 1 along axis 1)
p_values = np.array([
    [0.1, 0.2, 0.3, 0.4],
    [0.25, 0.25, 0.25, 0.25]
], dtype=np.float32)
p = tf.constant(p_values)

# p_logits: 2-D floating-point Tensor (batch_size x num_classes)
# Logits for p (not normalized)
p_logits_values = np.array([
    [0.5, 1.0, 1.5, 2.0],
    [-0.5, 0.0, 0.5, 1.0]
], dtype=np.float32)
p_logits = tf.constant(p_logits_values)

# q: 1-D floating-point Tensor (num_classes,)
# Should be a valid probability distribution (sums to 1)
q_values = np.array([0.1, 0.2, 0.3, 0.4], dtype=np.float32)
q = tf.constant(q_values)

ARGS = {
    'p': p,
    'p_logits': p_logits,
    'q': q
}
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 SymbolicTensor — a SymbolicTensor output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
leaky_relu Ran
ran, honoured the contract we drafted
rosinality/sagan-pytorch/model.py
code served (permissive licence) · get_code("de6376e3c77191a9")
How it ran

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

import torch

torch.manual_seed(0)

input_tensor = torch.randn(2, 4)

ARGS = {
    'input': input_tensor
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_data Ran
ran on a synthesized input
hiyouga/SAGAN-PyTorch/data_utils.py
code served (permissive licence) · get_code("df604797d5e1e1f4")
How it ran

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

import torch
import torch.nn as nn
from torch.utils.data import DataLoader, TensorDataset
import tempfile
import os

torch.manual_seed(0)

# Create a temporary directory for the data_path parameter
temp_dir = tempfile.mkdtemp()

# Create dummy CIFAR10-like data to avoid actual download
# CIFAR10 images are 32x32 RGB, so we'll create a small fake dataset
num_samples = 4
dummy_images = torch.randint(0, 256, (num_samples, 3, 32, 32), dtype=torch.uint8)
dummy_labels = torch.randint(0, 10, (num_samples,), dtype=torch.long)

# Create a simple dataset wrapper that mimics CIFAR10
class FakeCIFAR10:
    def __init__(self, root, train=True, transform=None, download=False):
        self.train = train
        self.transform = transform
        self.data = dummy_images
        self.targets = dummy_labels
    
    def __len__(self):
        return len(self.data)
    
    def __getitem__(self, idx):
        img = self.data[idx]
        label = self.targets[idx]
        if self.transform:
            from PIL import Image
            # Convert tensor to PIL Image for transform
            img_pil = Image.fromarray(img.permute(1, 2, 0).numpy())
            img = self.transform(img_pil)
        return img, label

# Patch the datasets module to use our fake dataset
import torchvision.datasets as datasets_module
original_cifar10 = datasets_module.CIFAR10
datasets_module.CIFAR10 = FakeCIFAR10

ARGS = {
    'im_size': 32,
    'batch_size': 2,
    'workers': 0,
    'dataset': 'cifar10',
    'data_path': temp_dir,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataLoader — a DataLoader output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataLoader 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
make_dataloader Ran
ran on a synthesized input
voletiv/self-attention-GAN-pytorch/utils.py
code served (permissive licence) · get_code("d605248fc0b2740e")
How it ran

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

import os
import torch
import torchvision.datasets as dset
from torchvision import transforms
from unittest.mock import Mock, MagicMock
import tempfile
from PIL import Image
import numpy as np

torch.manual_seed(0)

# Create a temporary directory with fake image data
temp_dir = tempfile.mkdtemp()
class_dir = os.path.join(temp_dir, 'class1')
os.makedirs(class_dir, exist_ok=True)

# Create a small fake image file
fake_img = Image.fromarray(np.random.randint(0, 256, (32, 32, 3), dtype=np.uint8))
fake_img.save(os.path.join(class_dir, 'fake1.jpg'))
fake_img.save(os.path.join(class_dir, 'fake2.jpg'))

# Define ARGS with all parameters for make_dataloader
ARGS = {
    'batch_size': 2,
    'dataset_type': 'folder',
    'data_path': temp_dir,
    'shuffle': True,
    'drop_last': True,
    'dataloader_args': {},
    'resize': True,
    'imsize': 128,
    'centercrop': False,
    'centercrop_size': 128,
    'totensor': True,
    'normalize': True,
    'norm_mean': (0.5, 0.5, 0.5),
    'norm_std': (0.5, 0.5, 0.5)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
make_dataset Ran
ran; our contract draft was wrong, not the code
Atmosphere-art/Self-Attention-GAN/dataset.py
code served (permissive licence) · get_code("776ca5e6e79753e3")
How it ran

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

import os
import tempfile
import shutil

# Create a temporary directory structure with test image files
temp_dir = tempfile.mkdtemp()

# Create class subdirectories with image files
class_names = ['cat', 'dog']
for class_name in class_names:
    class_dir = os.path.join(temp_dir, class_name)
    os.makedirs(class_dir, exist_ok=True)
    
    # Create some dummy image files
    for i in range(2):
        img_file = os.path.join(class_dir, f'image_{i}.jpg')
        with open(img_file, 'w') as f:
            f.write('dummy image content')
        
        # Also create a non-image file that should be ignored
        if i == 0:
            non_img_file = os.path.join(class_dir, 'readme.txt')
            with open(non_img_file, 'w') as f:
                f.write('not an image')

# Create class_to_idx mapping
class_to_idx = {
    'cat': 0,
    'dog': 1
}

ARGS = {
    'dir': temp_dir,
    'class_to_idx': class_to_idx
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
make_grid Ran
ran on a synthesized input
rahulkulhalli/ISIC2019/utils.py
code served (permissive licence) · get_code("696143e37ed7ad3e")
How it ran

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

import torch
import numpy as np

torch.manual_seed(0)

# Create a small tensor with shape (batch=16, channels=3, height=256, width=256)
# The function expects tensor.numpy() to work and transposes to (0, 2, 3, 1)
# Values should be in [-1, 1] range since the function scales by 127.5 + 127.5
tensor = torch.randn(16, 3, 256, 256) * 0.5

ARGS = {
    'tensor': tensor,
    'samples_per_class': 4,
    'num_classes': 8,
    'padding': 5,
    'im_size': 256
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family int, shape (2083, 1039, 3) — shape (2083, 1039, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
make_transform Ran
ran on a synthesized input
voletiv/self-attention-GAN-pytorch/utils.py
code served (permissive licence) · get_code("01aaeccd433501f0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Compose. 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 torchvision import transforms

torch.manual_seed(0)

ARGS = {
    "resize": True,
    "imsize": 128,
    "centercrop": False,
    "centercrop_size": 128,
    "totensor": True,
    "normalize": True,
    "norm_mean": (0.5, 0.5, 0.5),
    "norm_std": (0.5, 0.5, 0.5)
}
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 Compose — a Compose output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Compose 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
noop Ran
ran, honoured the contract we drafted
this paper's copy was not recorded; identical code first harvested from Abhimanyu08/Fixup_Initialization
pointer only; the stored copy get_code serves, from Abhimanyu08/Fixup_Initialization, is pointer only (licence: NONE) · get_code("5e2ed23acb71ee11")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

parse2tuple Ran
ran on a synthesized input
akanimax/attn_gan_pytorch/attn_gan_pytorch/ConfigManagement.py
code served (permissive licence) · get_code("81eef2989e68e1bb")
How it ran

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

import torch

ARGS = {
    'inp_str': '(3, 3)'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family int — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
prepare_mask_and_masked_image Ran
ran on a synthesized input
vijishmadhavan/SkinDeep/src/pipeline_stable_diffusion_controlnet_inpaint.py
code served (permissive licence) · get_code("2adc88ed4c50017c")
How it ran

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

import torch
import torch.nn as nn
import numpy as np
import PIL.Image

torch.manual_seed(0)

# Create a small image tensor: batch=2, channels=3, height=4, width=5
# Values in [-1, 1] range as required by the function
image = torch.rand(2, 3, 4, 5) * 2 - 1  # Range [-1, 1]

# Create a small mask tensor: batch=2, channels=1, height=4, width=5
# Values in [0, 1] range as required by the function
mask = torch.rand(2, 1, 4, 5)  # Range [0, 1]

ARGS = {
    "image": image,
    "mask": mask,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
python_image_grid Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ilyakava/gan/tensorflow_gan/python/eval/eval_utils.py
code served (permissive licence) · get_code("3c1810a3f62b3156")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 3, dtype family int, shape (8, 9, 2) 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 4D numpy array for a minibatch of images
# Shape: [batch_size, height, width, num_channels]
# Using batch_size=6, height=4, width=3, num_channels=2
batch_size = 6
height = 4
width = 3
num_channels = 2

input_array = np.random.randint(0, 256, size=(batch_size, height, width, num_channels), dtype=np.uint8)

# Grid shape that matches the batch size: 2 rows x 3 columns = 6 images
grid_shape = [2, 3]

ARGS = {
    'input_array': input_array,
    'grid_shape': grid_shape,
}
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 3, dtype family int, shape (8, 9, 2) — shape (8, 9, 2) 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
read_loss_log Ran
ran on a synthesized input
akanimax/attn_gan_pytorch/samples/generate_loss_plots.py
code served (permissive licence) · get_code("d5151aa5668d7556")
How it ran

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

# Create a temporary loss.log file with sample data
temp_dir = tempfile.mkdtemp()
file_name = os.path.join(temp_dir, 'loss.log')

# Write sample loss data with two columns (iteration and loss value)
sample_data = np.array([
    [1, 0.5],
    [2, 0.45],
    [3, 0.40],
    [4, 0.35]
])

np.savetxt(file_name, sample_data, delimiter='\t')

ARGS = {
    'file_name': file_name,
    'delimiter': '\t'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (4, 2) — shape (4, 2) 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
resize_image Ran
ran on a synthesized input
vijishmadhavan/SkinDeep/tattoorem.py
code served (permissive licence) · get_code("9519c43c0017c576")
How it ran

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

from PIL import Image
import numpy as np

# Create a simple test image using PIL
# Make a small image with distinct dimensions (width=100, height=75)
img_array = np.random.randint(0, 256, (75, 100, 3), dtype=np.uint8)
test_image = Image.fromarray(img_array, mode='RGB')

ARGS = {
    'image': test_image,
    'target_size': 50
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
run_classifier_fn Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ilyakava/gan/tensorflow_gan/python/eval/classifier_metrics.py
code served (permissive licence) · get_code("c9b8371a08cafd98")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned SymbolicTensor. 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 (batch_size=2, feature_dim=4)
input_tensor = tf.constant(np.random.randn(2, 4).astype(np.float32))

# Create a simple classifier function that takes input and returns outputs
def classifier_fn(x):
    # Simple classifier that returns a single output (batch_size, num_classes=3)
    return tf.keras.layers.Dense(3)(x)

# For single batch case, dtypes can be None
dtypes_single = None

# For multi-batch case, need to specify dtypes matching the output structure
dtypes_multi = tf.float32

ARGS = {
    'input_tensor': input_tensor,
    'classifier_fn': classifier_fn,
    'num_batches': 1,
    'dtypes': dtypes_single,
    'name': 'RunClassifierFn'
}
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 SymbolicTensor — a SymbolicTensor output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sample_and_run_classifier_fn Ran
ran; our contract draft was wrong, not the code
ilyakava/gan/tensorflow_gan/python/eval/classifier_metrics.py
code served (permissive licence) · get_code("e56d29a30182c70a")
How it ran

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

import tensorflow as tf
import numpy as np

def sample_fn(sample_input):
    """Function that samples images from a distribution"""
    # sample_input is a tensor, return sampled images
    batch_size = tf.shape(sample_input)[0]
    return tf.random.normal([batch_size, 4, 4, 3])

def classifier_fn(images):
    """Function that classifies images"""
    # Takes images tensor and returns classification output
    batch_size = tf.shape(images)[0]
    return tf.random.normal([batch_size, 10])

sample_inputs = [
    tf.constant(np.random.randn(2, 8).astype(np.float32)),
]

ARGS = {
    'sample_fn': sample_fn,
    'sample_inputs': sample_inputs,
    'classifier_fn': classifier_fn,
    'dtypes': None,
    'name': 'SampleAndRunClassifierFn'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 2, dtype family float, shape (2, 10) — shape (2, 10) 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
seed_everything Ran
ran on a synthesized input
kpandey008/SAGAN/config.py
code served (permissive licence) · get_code("c58d89114d55c178")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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
import random
import torch

torch.manual_seed(0)

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

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

import torch
import torch.nn as nn
from torch.nn.utils import spectral_norm

torch.manual_seed(0)

ARGS = {
    "num_embeddings": 10,
    "embedding_dim": 4,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Embedding — a Embedding output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Embedding output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
snconv2d Ran
ran; our contract draft was wrong, not the code
voletiv/self-attention-GAN-pytorch/sagan_models.py
code served (permissive licence) · get_code("572d43d0e50a2023")
How it ran

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

import torch
import torch.nn as nn
from torch.nn.utils import spectral_norm

torch.manual_seed(0)

ARGS = {
    'in_channels': 3,
    'out_channels': 16,
    'kernel_size': 3,
    'stride': 1,
    'padding': 1,
    'dilation': 1,
    'groups': 1,
    'bias': True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
snlinear Ran
ran on a synthesized input
voletiv/self-attention-GAN-pytorch/sagan_models.py
code served (permissive licence) · get_code("d7e3fc2fa558d6ef")
How it ran

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

import torch
import torch.nn as nn
from torch.nn.utils import spectral_norm

torch.manual_seed(0)

ARGS = {
    "in_features": 4,
    "out_features": 3,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Linear — a Linear output has no array shape of its own; none 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
spectral_init Ran
ran; our contract draft was wrong, not the code
rosinality/sagan-pytorch/model.py
code served (permissive licence) · get_code("6c51f01ab7abcc0d")
How it ran

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

import torch
import torch.nn as nn
from torch.nn import init

torch.manual_seed(0)

# Create a simple linear module with weight and bias
# The function accesses module.weight and module.bias
# We need a module that has these attributes
test_module = nn.Linear(in_features=3, out_features=5)

ARGS = {
    'module': test_module,
    'gain': 1.5
}
Setup block drafted by
a language model, Claude Sonnet 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 Linear — a Linear output has no array shape of its own; none 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
spectral_norm Ran
ran; our contract draft was wrong, not the code
rosinality/sagan-pytorch/model.py
code served (permissive licence) · get_code("a493780508978abe")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned SimpleLinear. 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 a simple module with a weight parameter
# The function accesses module._parameters, module.register_parameter, 
# module.register_buffer, and module.register_forward_pre_hook
# It also uses getattr/setattr on the module

class SimpleLinear(nn.Module):
    def __init__(self):
        super().__init__()
        # Create a weight parameter with shape (out_features, in_features)
        # Using distinct dimensions: 5 output features, 3 input features
        self.weight = nn.Parameter(torch.randn(5, 3))
    
    def forward(self, x):
        return torch.matmul(x, self.weight.t())

module = SimpleLinear()

ARGS = {
    'module': module,
    'name': 'weight'
}
Setup block drafted by
a language model, Claude Sonnet 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 SimpleLinear — a SimpleLinear output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleLinear 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
stargan_prediction_input_fn_wrapper Ran
ran; our contract draft was wrong, not the code
ilyakava/gan/tensorflow_gan/python/estimator/stargan_estimator.py
code served (permissive licence) · get_code("86ee4730f89c1466")
How it ran

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

import torch
import torch.nn as nn
import numpy as np

# Define a simple input function that returns (feature, label) tuple
def simple_input_fn():
    # Create sample features and labels for StarGAN
    features = {
        'image': torch.randn(2, 3, 4, 4),  # batch_size=2, channels=3, height=4, width=4
        'domain': torch.randint(0, 2, (2,))  # batch_size=2, domain labels
    }
    labels = torch.randint(0, 2, (2,))  # batch_size=2 labels
    return (features, labels)

ARGS = {
    'fn': simple_input_fn
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
torch_item Ran
ran on a synthesized input
alfagao/DeOldify/fastai/model.py
code served (permissive licence) · get_code("3f8c44e7445adaad")
How it ran

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

import torch

torch.manual_seed(0)

# The function checks if x has an 'item' method (like a scalar tensor)
# and calls it if it does, otherwise returns x[0]

# Test case 1: a scalar tensor (has .item() method)
scalar_tensor = torch.tensor(42.0)

# Test case 2: a list or array-like object (uses indexing)
list_input = [3.14, 2.71, 1.41]

# We'll use the scalar tensor case as our primary argument
ARGS = {
    'x': scalar_tensor
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
wasserstein_discriminator_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ilyakava/gan/tensorflow_gan/python/losses/losses_impl.py
code served (permissive licence) · get_code("6dfacdb4f7f296a6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned SymbolicTensor. 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

# Set random seed for reproducibility
tf.compat.v1.set_random_seed(0)

# Create small discriminator output tensors
# Batch size: 2, output dimension: 1 (discriminator typically outputs scalars)
batch_size = 2
output_dim = 1

discriminator_real_outputs = tf.constant(
    [[0.5], [0.3]], dtype=tf.float32
)

discriminator_gen_outputs = tf.constant(
    [[-0.4], [-0.2]], dtype=tf.float32
)

# Weights can be scalars or tensors matching the shape of outputs
real_weights = 1.0
generated_weights = 1.0

# Scope name for the operation
scope = "wasserstein_discriminator_loss_scope"

# Loss collection (using default TensorFlow collections)
loss_collection = tf.compat.v1.GraphKeys.LOSSES

# Reduction type
reduction = tf.compat.v1.losses.Reduction.SUM_BY_NONZERO_WEIGHTS

# Whether to add summaries
add_summaries = False

ARGS = {
    "discriminator_real_outputs": discriminator_real_outputs,
    "discriminator_gen_outputs": discriminator_gen_outputs,
    "real_weights": real_weights,
    "generated_weights": generated_weights,
    "scope": scope,
    "loss_collection": loss_collection,
    "reduction": reduction,
    "add_summaries": add_summaries,
}
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 SymbolicTensor — a SymbolicTensor output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
wasserstein_generator_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ilyakava/gan/tensorflow_gan/python/losses/losses_impl.py
code served (permissive licence) · get_code("ef511aaa7c479fd0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned SymbolicTensor. 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 discriminator output tensor
# Shape: (batch_size=2, features=4)
discriminator_gen_outputs = tf.constant(
    [[0.5, -0.3, 0.2, 0.1],
     [0.4, 0.1, -0.2, 0.3]],
    dtype=tf.float32
)

# Create weights tensor with same rank as discriminator_gen_outputs
weights = tf.constant(
    [[1.0, 1.0, 1.0, 1.0],
     [1.0, 1.0, 1.0, 1.0]],
    dtype=tf.float32
)

# Build ARGS dictionary with all parameters
ARGS = {
    'discriminator_gen_outputs': discriminator_gen_outputs,
    'weights': weights,
    'scope': None,
    'loss_collection': tf.compat.v1.GraphKeys.LOSSES,
    'reduction': tf.compat.v1.losses.Reduction.SUM_BY_NONZERO_WEIGHTS,
    'add_summaries': 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 SymbolicTensor — a SymbolicTensor output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
wasserstein_hinge_discriminator_loss Ran
ran; our contract draft was wrong, not the code
ilyakava/gan/tensorflow_gan/python/losses/losses_impl.py
code served (permissive licence) · get_code("3160840ade588e25")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned SymbolicTensor. 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

tf.compat.v1.disable_eager_execution()

# Create small tensors for discriminator outputs
# batch_size=2, output_dim=4
discriminator_real_outputs = tf.constant([[0.5, 1.2, -0.3, 0.8],
                                          [1.1, 0.2, 0.9, -0.4]], dtype=tf.float32)

discriminator_gen_outputs = tf.constant([[-0.2, 0.8, 1.5, 0.1],
                                         [0.3, -0.5, 0.7, 1.2]], dtype=tf.float32)

# Real and generated weights - can be scalar or tensor
real_weights = 1.0
generated_weights = 1.0

# Hinge parameters
real_hinge = 1.0
generated_hinge = 1.0

# Scope for the operations
scope = None

# Loss collection
loss_collection = tf.compat.v1.GraphKeys.LOSSES

# Reduction strategy
reduction = tf.compat.v1.losses.Reduction.SUM_BY_NONZERO_WEIGHTS

# Whether to add summaries
add_summaries = False

ARGS = {
    'discriminator_real_outputs': discriminator_real_outputs,
    'discriminator_gen_outputs': discriminator_gen_outputs,
    'real_weights': real_weights,
    'generated_weights': generated_weights,
    'real_hinge': real_hinge,
    'generated_hinge': generated_hinge,
    'scope': scope,
    'loss_collection': loss_collection,
    'reduction': reduction,
    'add_summaries': add_summaries,
}
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 SymbolicTensor — a SymbolicTensor output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
zip_strict_ Ran
ran on a synthesized input
alfagao/DeOldify/fastai/layer_optimizer.py
code served (permissive licence) · get_code("b80bba5071349f52")
How it ran

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

import torch
import numpy as np

torch.manual_seed(0)

# The function zip_strict_ takes two sequences l and r,
# asserts they have the same length, and returns a zip of them.
# We need to provide two lists/sequences of equal length.

l = [1, 2, 3, 4]
r = ['a', 'b', 'c', 'd']

ARGS = {
    'l': l,
    'r': r
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type zip — a zip output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a zip 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
args_to_gan_model Not yet run
unverified (harvested, no recorded run)
ilyakava/gan/tensorflow_gan/python/losses/tuple_losses.py
code served (permissive licence) · get_code("3ed7cb04ca358824")
How it ran

no invocation recorded.

blur Not yet run
unverified (harvested, no recorded run)
IEWbgfnYDwHRoRRSKtkdyMDUzgdwuBYgDKtDJWd/doldy/app_utils.py
code served (permissive licence) · get_code("42067c777f73e7fe")
How it ran

no invocation recorded.

conv1d Not yet run
unverified (harvested, no recorded run)
sdoria/SimpleSelfAttention/xresnet.py
code served (permissive licence) · get_code("9529ce8993bceed1")
How it ran

no invocation recorded.

conv2d Not yet run
unverified (harvested, no recorded run)
brain-research/self-attention-gan/ops.py
code served (permissive licence) · get_code("77abc303c4715e0c")
How it ran

no invocation recorded.

deconv2d Not yet run
unverified (harvested, no recorded run)
brain-research/self-attention-gan/ops.py
code served (permissive licence) · get_code("5dd971c70bb05143")
How it ran

no invocation recorded.

discriminator_fn Not yet run
unverified (harvested, no recorded run)
ilyakava/gan/tensorflow_gan/python/estimator/tpu_gan_estimator_test_lib.py
code served (permissive licence) · get_code("1341ccc8c51a764e")
How it ran

no invocation recorded.

download Not yet run
unverified (harvested, no recorded run)
IEWbgfnYDwHRoRRSKtkdyMDUzgdwuBYgDKtDJWd/doldy/app_utils.py
code served (permissive licence) · get_code("e76e1f39c42ee168")
How it ran

no invocation recorded.

fbeta_torch Not yet run
unverified (harvested, no recorded run)
alfagao/DeOldify/fastai/losses.py
code served (permissive licence) · get_code("bddb0f7db928e1b9")
How it ran

no invocation recorded.

generator_fn Not yet run
unverified (harvested, no recorded run)
ilyakava/gan/tensorflow_gan/python/estimator/tpu_gan_estimator_test_lib.py
code served (permissive licence) · get_code("ace1970711646371")
How it ran

no invocation recorded.

get_config Not yet run
unverified (harvested, no recorded run)
akanimax/attn_gan_pytorch/attn_gan_pytorch/ConfigManagement.py
code served (permissive licence) · get_code("7b64c2c40ebe4e1d")
How it ran

no invocation recorded.

get_confirm_token Not yet run
unverified (harvested, no recorded run)
taki0112/Self-Attention-GAN-Tensorflow/download.py
pointer only (licence: MIT); the stored copy get_code serves, from med-air/FedBN, is pointer only (licence: NONE) · get_code("135b3dc835ffe6ad")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from med-air/FedBN, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_cv_idxs Not yet run
unverified (harvested, no recorded run)
alfagao/DeOldify/fastai/dataset.py
code served (permissive licence) · get_code("149a12c4dc7845d3")
How it ran

no invocation recorded.

get_emb Not yet run
unverified (harvested, no recorded run)
alfagao/DeOldify/fastai/column_data.py
code served (permissive licence) · get_code("2e0a726be884ad1d")
How it ran

no invocation recorded.

get_eval_estimator_spec Not yet run
unverified (harvested, no recorded run)
ilyakava/gan/tensorflow_gan/python/estimator/gan_estimator.py
code served (permissive licence) · get_code("6b36eef1846a9c6e")
How it ran

no invocation recorded.

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

Also present in other papers' code

Of 81 samples lifted from this paper's linked repositories, 81 carry a function identity and 0 do not. Of the 81 distinct functions with an identity, 34 are also present in other papers whose code we hold (9 with at least one paper dated earlier, 1 the same month, 31 later) and 47 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
get_confirm_token 38 other papers
8 dated earlier, 3 the same month, 27 later
1409.8230 (2014-09)
RENOIR - A Dataset for Real Low-Light Image Noise Reduction
1503.03832 (2015-03)
FaceNet: A Unified Embedding for Face Recognition and Clustering
1506.03134 (2015-06)
Pointer Networks
and 35 more not named here
is_image_file 22 other papers
2 dated earlier, 20 later
1406.2661 (2014-06)
Generative Adversarial Networks
1603.08511 (2016-03)
Colorful Image Colorization
1809.04729 (2018-09)
A Less Biased Evaluation of Out-of-distribution Sample Detectors
and 19 more not named here
accuracy 19 other papers
19 later
2105.14148 (2021-05)
OpenMatch: Open-set Consistency Regularization for Semi-supervised Learning with Outliers
2110.03006 (2021-10)
Unsupervised Selective Labeling for More Effective Semi-Supervised Learning
2111.13824 (2021-11)
FQ-ViT: Post-Training Quantization for Fully Quantized Vision Transformer
and 16 more not named here
noop 9 other papers
9 later
1901.09321 (2019-01)
Fixup Initialization: Residual Learning Without Normalization
1906.03028 (2019-06)
Automatic Reparameterisation of Probabilistic Programs
1908.08681 (2019-08)
Mish: A Self Regularized Non-Monotonic Activation Function
and 6 more not named here
denorm 5 other papers
5 later
1809.11096 (2018-09)
Large Scale GAN Training for High Fidelity Natural Image Synthesis
2010.02637 (2020-10)
Weakly Supervised Disentangled Generative Causal Representation Learning
2201.12179 (2022-01)
Plug & Play Attacks: Towards Robust and Flexible Model Inversion Attacks
and 2 more not named here
get_data_loader 5 other papers
3 dated earlier, 2 later
1511.06434 (2015-11)
Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks
1710.10196 (2017-10)
Progressive Growing of GANs for Improved Quality, Stability, and Variation
1710.10916 (2017-10)
StackGAN++: Realistic Image Synthesis with Stacked Generative Adversarial Networks
and 2 more not named here
get_transform 4 other papers
3 dated earlier, 1 later
1511.06434 (2015-11)
Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks
1710.10196 (2017-10)
Progressive Growing of GANs for Improved Quality, Stability, and Variation
1710.10916 (2017-10)
StackGAN++: Realistic Image Synthesis with Stacked Generative Adversarial Networks
and 1 more not named here
snconv2d 4 other papers
4 later
2002.06661 (2020-02)
Latent Normalizing Flows for Many-to-Many Cross-Domain Mappings
2002.11810 (2020-02)
On Leveraging Pretrained GANs for Generation with Limited Data
2010.02637 (2020-10)
Weakly Supervised Disentangled Generative Causal Representation Learning
and 1 more not named here
read_loss_log 3 other papers
1 dated earlier, 2 later
1511.06434 (2015-11)
Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks
1810.00821 (2018-10)
Variational Discriminator Bottleneck: Improving Imitation Learning, Inverse RL, and GANs by Constraining Information Flow
1903.06048 (2019-03)
MSG-GAN: Multi-Scale Gradients for Generative Adversarial Networks
snlinear 2 other papers
2 later
2002.06661 (2020-02)
Latent Normalizing Flows for Many-to-Many Cross-Domain Mappings
2010.02637 (2020-10)
Weakly Supervised Disentangled Generative Causal Representation Learning
spectral_norm 2 other papers
1 dated earlier, 1 later
1710.10196 (2017-10)
Progressive Growing of GANs for Improved Quality, Stability, and Variation
1811.11212 (2018-11)
Self-Supervised GANs via Auxiliary Rotation Loss
conv 1 other paper
1 later
1908.08681 (2019-08)
Mish: A Self Regularized Non-Monotonic Activation Function
discriminator_fn 1 other paper
1 later
2405.11605 (2024-05)
Switched Flow Matching: Eliminating Singularities via Switching ODEs
find_classes 1 other paper
1 dated earlier
1603.08511 (2016-03)
Colorful Image Colorization
generator_fn 1 other paper
1 later
2405.11605 (2024-05)
Switched Flow Matching: Eliminating Singularities via Switching ODEs
get_config 1 other paper
1 dated earlier
1710.10916 (2017-10)
StackGAN++: Realistic Image Synthesis with Stacked Generative Adversarial Networks
get_trainable_variables 1 other paper
1 later
2405.11605 (2024-05)
Switched Flow Matching: Eliminating Singularities via Switching ODEs
get_variables 1 other paper
1 later
2405.11605 (2024-05)
Switched Flow Matching: Eliminating Singularities via Switching ODEs
get_variables_by_name 1 other paper
1 later
2405.11605 (2024-05)
Switched Flow Matching: Eliminating Singularities via Switching ODEs
image_grid 1 other paper
1 later
2405.11605 (2024-05)
Switched Flow Matching: Eliminating Singularities via Switching ODEs

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

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

Repositories linked to this paper

More are linked than shown here.

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

Abstract

In this paper, we propose the Self-Attention Generative Adversarial Network (SAGAN) which allows attention-driven, long-range dependency modeling for image generation tasks. Traditional convolutional GANs generate high-resolution details as a function of only spatially local points in lower-resolution feature maps. In SAGAN, details can be generated using cues from all feature locations. Moreover, the discriminator can check that highly detailed features in distant portions of the image are consistent with each other. Furthermore, recent work has shown that generator conditioning affects GAN performance. Leveraging this insight, we apply spectral normalization to the GAN generator and find that this improves training dynamics. The proposed SAGAN achieves the state-of-the-art results, boosting the best published Inception score from 36.8 to 52.52 and reducing Frechet Inception distance from 27.62 to 18.65 on the challenging ImageNet dataset. Visualization of the attention layers shows that the generator leverages neighborhoods that correspond to object shapes rather than local regions of fixed shape.

For agents

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

get_harvested_code_for_paper("1805.08318")
get_code_for_paper("1805.08318")
have("1805.08318")

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

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

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

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

Connect an agent — have() is free.