SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1609.04802 · CVPR · 2016

Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network

arXiv · PDF · Open in the Atlas

Code that ran

55 of 72 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; 3 honoured the contract we drafted, 3 violated it and 39 have no contract verdict; 10 failures of our instrument; 17 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1609.04802.json · badge: /api/ran/1609.04802.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
shirsenduhalder/SRResGAN-Improved-Perceptual community (classifier label)
classifier basis not recorded on the link
8 ran · 1 no recorded run
srikanthmandru/Image-Super-Resolution-SRGAN community (classifier label)
classifier basis not recorded on the link
7 ran · 5 no recorded run
jason-zl190/sisr community (classifier label)
classifier basis not recorded on the link
5 ran · 1 no recorded run
Lornatang/SRGAN-PyTorch community (classifier label)
classifier basis not recorded on the link
4 ran · 2 no recorded run
AntonioAlgaida/Edge.SRGAN community (classifier label)
classifier basis not recorded on the link
4 ran · 0 no recorded run
JasonPlawinski/SuperResolution reimplementation (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
leftthomas/SRGAN community (classifier label)
classifier basis not recorded on the link
3 ran · 0 no recorded run
Adk2001tech/GAN-Image-Super-Resolution community (classifier label)
classifier basis not recorded on the link
3 ran · 0 no recorded run
Lornatang/SRCNN-PyTorch community (classifier label)
classifier basis not recorded on the link
3 ran · 0 no recorded run
liruilong940607/SRResnet reimplementation (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
anujtyagi2802/SRGAN reimplementation (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
itsuki8914/srresnet4x community (classifier label)
classifier basis not recorded on the link
1 ran · 3 no recorded run
tomtrac/SRGAN_power_data_generation community (classifier label)
classifier basis not recorded on the link
1 ran · 2 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
V0LsTeR/mySRResNet community (classifier label)
classifier basis: plan_row
1 ran · 0 no recorded run
chilung/NCTU_Adv_DNN_HW4 community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
ayushmankumar7/SISR-Tensorflow-2.x community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
alexjc/neural-enhance reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
idealo/image-super-resolution reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
UdbhavPrasad072300/Image-Super-Resolution community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
teakkkz/imageSR reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
fengye-lu/PyTorch-SRGAN reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
ShambhawiVarchasva/SRGAN reimplementation (classifier label)
classifier basis: classifier_2025
0 ran · 2 no recorded run
IBM/MAX-Image-Resolution-Enhancer reimplementation (classifier label)
classifier basis: classifier_2025
0 ran · 1 no recorded run
FunctionStatusWhere it lives
CompareImage Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
JasonPlawinski/SuperResolution/GenerateResults.py
pointer only (licence: NONE) · get_code("2afa7e90665b012c")
How it ran

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

CompareImageDelimit Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
JasonPlawinski/SuperResolution/GenerateResults.py
pointer only (licence: NONE) · get_code("01b589edccc5e5d2")
How it ran

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

PixelUpscale Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
JasonPlawinski/SuperResolution/GenerateResults.py
pointer only (licence: NONE) · get_code("c58ef2e6eb1e5518")
How it ran

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

To_numpy Ran
ran; our contract draft was wrong, not the code
liruilong940607/SRResnet/main_srresnet.py
code served (permissive licence) · get_code("6d6c284ecfd49ad5")
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 ndarray, ndim 3, dtype family float, shape (5, 4, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function expects a tensor and will:
# 1. detach() it
# 2. move to cpu()
# 3. convert to numpy()
# 4. transpose(1, 2, 0)
# 
# The transpose(1, 2, 0) suggests the input is a 3D tensor with shape (C, H, W)
# that gets transposed to (H, W, C) - typical for image tensors

# Create a small 3D tensor with shape (channels, height, width)
# Using distinct dimensions: 3 channels, 5 height, 4 width
tensor = torch.randn(3, 5, 4)

ARGS = {
    'tensor': 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 ndarray, ndim 3, dtype family float, shape (5, 4, 3) — shape (5, 4, 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
To_tensor Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
liruilong940607/SRResnet/main_srresnet.py
code served (permissive licence) · get_code("70c52caba1e838db")
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 3, dtype family float, shape (2, 3, 5) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import torch

# Create a small numpy array representing an image with shape (height, width, channels)
# Using distinct dimensions: height=3, width=5, channels=2
img = np.random.rand(3, 5, 2).astype(np.float32)

ARGS = {
    'img': img
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 3, 5) — shape (2, 3, 5) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
add_argument_group Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from carpedm20/ENAS-pytorch
pointer only · get_code("6d80592fd6d47b2d")
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.

adjust_learning_rate Ran
ran, honoured the contract we drafted
V0LsTeR/mySRResNet/main_srresnet.py
pointer only (licence: MIT); the stored copy get_code serves, from xl-tang3/RCOT, is pointer only (licence: NONE) · get_code("9496ce74f56e1d57")
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 xl-tang3/RCOT, 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.

best_model_saver Ran
ran on a synthesized input
srikanthmandru/Image-Super-Resolution-SRGAN/model_utils.py
code served (permissive licence) · get_code("4ea67632254be0ab")
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 tempfile
import os
import shutil

# Create a temporary directory structure for testing
temp_dir = tempfile.mkdtemp()
model_dir = os.path.join(temp_dir, 'model_checkpoints')
os.makedirs(model_dir, exist_ok=True)

# Create dummy checkpoint files that the function will copy
best_chkpt_monitoring_path = 1000
checkpoint_basename = f'model.ckpt-{best_chkpt_monitoring_path}'

# Create mock checkpoint files with different extensions
for ext in ['.meta', '.index', '.data-00000-of-00001']:
    checkpoint_file = os.path.join(model_dir, checkpoint_basename + ext)
    with open(checkpoint_file, 'w') as f:
        f.write('mock checkpoint data')

ARGS = {
    'model_dir': model_dir,
    'best_chkpt_monitoring_path': best_chkpt_monitoring_path,
    'best_chkpt_monitoring_variable': 35.42
}
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 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
binary_crossentropy Ran
ran on a synthesized input
jason-zl190/sisr/trainer/utils/losses.py
code served (permissive licence) · get_code("3434eae005340d90")
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 binary classification data
batch_size = 2
num_classes = 1

# y_true: binary labels (0 or 1) - shape (batch_size,) or (batch_size, 1)
y_true = tf.constant([[1.0], [0.0]], dtype=tf.float32)

# y_pred: predicted probabilities - shape (batch_size,) or (batch_size, 1)
# Values should be between 0 and 1 for binary crossentropy
y_pred = tf.constant([[0.9], [0.2]], dtype=tf.float32)

ARGS = {
    "y_true": y_true,
    "y_pred": y_pred,
}
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
calculate_valid_crop_size Ran
ran on a synthesized input
leftthomas/SRGAN/data_utils.py
code served (permissive licence) · get_code("c889b417f65ffc2a")
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. 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)

crop_size = 128
upscale_factor = 4

ARGS = {
    "crop_size": crop_size,
    "upscale_factor": upscale_factor
}
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 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
compute_avg_loss_gpu Ran
ran on a synthesized input
srikanthmandru/Image-Super-Resolution-SRGAN/loss_function_utils.py
code served (permissive licence) · get_code("d46976e6023acdb9")
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 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 tensorflow as tf
import numpy as np

# Create a small per-replica loss tensor
# Shape: (batch_size,) - a 1D tensor of loss values
per_replica_loss_tensor = tf.constant([0.5, 0.3], dtype=tf.float32)

# Set global batch size
GLOBAL_BATCH_SIZE_IN = 2

# Define arguments dict
ARGS = {
    "per_replica_loss_tensor": per_replica_loss_tensor,
    "GLOBAL_BATCH_SIZE_IN": GLOBAL_BATCH_SIZE_IN
}
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 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
conjugate_gradients Ran
ran on a synthesized input
shirsenduhalder/SRResGAN-Improved-Perceptual/basic_utils.py
code served (permissive licence) · get_code("2d594866e7355287")
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 1, dtype family float, shape (5,) 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 torch
import torch.nn as nn

torch.manual_seed(0)

# Define a minimal model that accepts the expected inputs
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Define a minimal optimizer (we'll create a dummy one)
class DummyOptimizer:
    def __init__(self, model):
        self.param_groups = [{'params': model.parameters()}]

# Define the Avp function that computes A*v*p
# It takes (a, p, model_inner, optimizer_G_inner, meta_lambda) and returns a vector
def avp_func(a, p, model_inner, optimizer_G_inner, meta_lambda):
    # Return a tensor of same shape as p
    # This is a stand-in that performs some operation
    return p * 0.5

# Create instances
model_inner = SimpleModel()
optimizer_G_inner = DummyOptimizer(model_inner)

# Create small tensors for a and b
a = torch.randn(2, 4)  # batch of 2, dim 4
b = torch.randn(5)     # vector of size 5

ARGS = {
    'Avp': avp_func,
    'a': a,
    'b': b,
    'model_inner': model_inner,
    'optimizer_G_inner': optimizer_G_inner,
    'nsteps': 3,
    'meta_lambda': 0.01,
    'residual_tol': 1e-10,
    'cuda': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 1, dtype family float, shape (5,) — shape (5,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
convert_image Ran
ran on a synthesized input
chilung/NCTU_Adv_DNN_HW4/utils.py
code served (permissive licence) · get_code("e256cf653cf6d2e0")
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 3, dtype family float, shape (3, 8, 8) 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 torch
import torchvision.transforms.functional as FT
from PIL import Image
import numpy as np

torch.manual_seed(0)

# Create a small PIL image for testing
pil_img = Image.fromarray(np.uint8(np.random.rand(8, 8, 3) * 255))

# Create a tensor in [0, 1] range with shape (3, 8, 8) for 3D case
tensor_01_3d = torch.rand(3, 8, 8)

# Create a tensor in [0, 1] range with shape (2, 3, 12, 12) for 4D case (batch=2, channels=3)
tensor_01_4d = torch.rand(2, 3, 12, 12)

# Create a tensor in [-1, 1] range
tensor_m1_1 = 2.0 * torch.rand(3, 8, 8) - 1.0

# Test with different source/target combinations
ARGS = {
    'img': tensor_01_3d,
    'source': '[0, 1]',
    'target': '[0, 255]'
}
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 Tensor, ndim 3, dtype family float, shape (3, 8, 8) — shape (3, 8, 8) 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
convolution_block Ran
ran on a synthesized input
ayushmankumar7/SISR-Tensorflow-2.x/src/models/model.py
code served (permissive licence) · get_code("8645382c22f52fdb")
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 KerasTensor. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tensorflow as tf
import numpy as np

# Create a small input tensor for the Conv2D layer
# Shape: (batch_size, height, width, channels)
batch_size = 2
height = 4
width = 4
input_channels = 3

inputs = tf.keras.Input(shape=(height, width, input_channels))

ARGS = {
    'inputs': inputs,
    'n_filters': 16,
    'filter_size': 3,
    'strides': 1,
    'bn': True,
    'momentum': 0.8
}
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 KerasTensor — a KerasTensor 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
d_generated_loss Ran
ran on a synthesized input
jason-zl190/sisr/trainer/models/sisr/gan.py
code served (permissive licence) · get_code("02583d21639a84ac")
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 small discriminator output tensor
# The function expects disc_generated_output to have a shape compatible with
# tf.zeros_like() and cross_entropy computation
batch_size = 2
output_dim = 4

# Create dummy y_true (not actually used in the function body, but it's a parameter)
y_true = tf.zeros((batch_size, output_dim), dtype=tf.float32)

# Create dummy discriminator output
disc_generated_output = tf.random.normal((batch_size, output_dim), dtype=tf.float32)

ARGS = {
    "y_true": y_true,
    "disc_generated_output": disc_generated_output
}
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
d_real_loss Ran
ran on a synthesized input
jason-zl190/sisr/trainer/models/sisr/gan.py
code served (permissive licence) · get_code("e785257cb314e746")
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 seeds for reproducibility
tf.random.set_seed(0)
np.random.seed(0)

# Create small discriminator output tensor
# Shape: (batch_size=2, output_dim=4)
disc_real_output = tf.constant(
    [[0.8, 0.9, 0.7, 0.85],
     [0.75, 0.88, 0.82, 0.79]],
    dtype=tf.float32
)

# Create y_true - this parameter is passed to cross_entropy but not used in function logic
# We can use any compatible tensor shape
y_true = tf.zeros_like(disc_real_output)

ARGS = {
    "y_true": y_true,
    "disc_real_output": disc_real_output,
}
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
define_loss Ran
ran on a synthesized input
Lornatang/SRGAN-PyTorch/train_net.py
code served (permissive licence) · get_code("dbcaad1f521f085f")
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 MSELoss. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch import nn

torch.manual_seed(0)

config = {
    'TRAIN': {
        'LOSSES': {
            'PIXEL_LOSS': {
                'NAME': 'MSELoss'
            }
        }
    }
}

device = torch.device('cpu')

ARGS = {
    'config': config,
    'device': device
}
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 MSELoss — a MSELoss output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MSELoss 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
denormalize Ran
ran, violated the contract we drafted
anujtyagi2802/SRGAN/test_new.py
pointer only (licence: NONE) · get_code("8a74ff00c12f2f24")
How it ran

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

dict_to_nonedict Ran
ran; our contract draft was wrong, not the code
shirsenduhalder/SRResGAN-Improved-Perceptual/options/options.py
pointer only (licence: MIT); the stored copy get_code serves, from liyuantsao/BFSR, is pointer only (licence: NONE) · get_code("ada7273eee7081c7")
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 liyuantsao/BFSR, 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.

discriminator_optimizer Ran
ran on a synthesized input
srikanthmandru/Image-Super-Resolution-SRGAN/optimizers_file_py.py
code served (permissive licence) · get_code("e19a04532f5eeee5")
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 AdamOptimizer. 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

# The function uses discriminator_lr as a float value for the learning rate
# and step_change as an integer for the conditional step comparison
# Both are straightforward numeric parameters

discriminator_lr_value = 0.0002
step_change_value = 2000

ARGS = {
    "discriminator_lr": discriminator_lr_value,
    "step_change": step_change_value,
}
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 AdamOptimizer — a AdamOptimizer output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a AdamOptimizer 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
extend Ran
ran; our contract draft was wrong, not the code
alexjc/neural-enhance/enhance.py
pointer only (licence: AGPL-3.0) · get_code("a8dabd6fc5e7e33d")
How it ran

The body of this sample is withheld: AGPL-3.0, as GitHub detects it on this paper's repository, alexjc/neural-enhance, is not in the permissive set Syntology serves inline. 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.

flip_and_rotate_and_edges Ran
ran on a synthesized input
AntonioAlgaida/Edge.SRGAN/data_loader.py
code served (permissive licence) · get_code("604d3495f5943041")
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 torchvision.transforms.functional as F

torch.manual_seed(0)

# Create small PIL Images or tensors for the function
# The function uses F.hflip, F.vflip, and F.rotate which work with PIL Images or tensors
# Let's use PIL Images since that's what torchvision typically expects

from PIL import Image
import numpy as np

# Create small dummy images (4x3 for distinctness)
hq_array = np.random.randint(0, 256, (4, 3, 3), dtype=np.uint8)
lq_array = np.random.randint(0, 256, (2, 2, 3), dtype=np.uint8)
hq_edge_array = np.random.randint(0, 256, (4, 3, 1), dtype=np.uint8)
lq_edge_array = np.random.randint(0, 256, (2, 2, 1), dtype=np.uint8)

HQ = Image.fromarray(hq_array)
LQ = Image.fromarray(lq_array)
HQ_edge = Image.fromarray(hq_edge_array.squeeze(-1))
LQ_edge = Image.fromarray(lq_edge_array.squeeze(-1))

ARGS = {
    "HQ": HQ,
    "LQ": LQ,
    "HQ_edge": HQ_edge,
    "LQ_edge": LQ_edge,
}
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 — 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
g_gan_loss Ran
ran on a synthesized input
jason-zl190/sisr/trainer/models/sisr/gan.py
code served (permissive licence) · get_code("5e44f72ed27f1131")
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

cross_entropy = tf.keras.losses.BinaryCrossentropy()

def g_gan_loss(y_true, disc_generated_output):
    gan_loss = cross_entropy(tf.ones_like(disc_generated_output), disc_generated_output)
    return gan_loss

# Create small test tensors
batch_size = 2
output_dim = 4

# y_true: dummy tensor (not actually used in the function body, but required as parameter)
y_true = tf.constant(np.random.rand(batch_size, output_dim).astype(np.float32))

# disc_generated_output: discriminator output that will be compared to ones
disc_generated_output = tf.constant(np.random.rand(batch_size, output_dim).astype(np.float32))

ARGS = {
    "y_true": y_true,
    "disc_generated_output": disc_generated_output,
}
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
generator_optimizer Ran
ran on a synthesized input
srikanthmandru/Image-Super-Resolution-SRGAN/optimizers_file_py.py
code served (permissive licence) · get_code("074af80c24ea319b")
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 AdamOptimizer. 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 up TensorFlow to work with eager execution and compat v1
tf.compat.v1.enable_eager_execution()

# Define the arguments for the generator_optimizer function
ARGS = {
    "generator_lr": 0.0002,
    "step_change": 2000
}
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 AdamOptimizer — a AdamOptimizer output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a AdamOptimizer 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_D Ran
ran on a synthesized input
Adk2001tech/GAN-Image-Super-Resolution/model.py
code served (permissive licence) · get_code("c0cb90979e909ea0")
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 Functional. 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

ARGS = {
    "input_shape": (64, 64, 3)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Functional — a Functional output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Functional 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 Ran
ran on a synthesized input
Adk2001tech/GAN-Image-Super-Resolution/utils.py
code served (permissive licence) · get_code("4eaf9f6f2c5f16d5")
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
import numpy as np
import cv2

# Create a temporary directory structure with dummy images
temp_dir = tempfile.mkdtemp()
hr_dir = os.path.join(temp_dir, 'HR')
lr_dir = os.path.join(temp_dir, 'LR')
os.makedirs(hr_dir)
os.makedirs(lr_dir)

# Create dummy HR images (384x384)
for i in range(2):
    hr_img = np.random.randint(0, 256, (384, 384, 3), dtype=np.uint8)
    cv2.imwrite(os.path.join(hr_dir, f'hr_{i}.png'), cv2.cvtColor(hr_img, cv2.COLOR_RGB2BGR))

# Create dummy LR images (96x96)
for i in range(2):
    lr_img = np.random.randint(0, 256, (96, 96, 3), dtype=np.uint8)
    cv2.imwrite(os.path.join(lr_dir, f'lr_{i}.png'), cv2.cvtColor(lr_img, cv2.COLOR_RGB2BGR))

ARGS = {
    'path': temp_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — 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
get_gan_network Ran
ran on a synthesized input
tomtrac/SRGAN_power_data_generation/SRGAN_train.py
code served (permissive licence) · get_code("bcbe49bc56dfc0ce")
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 Functional. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tensorflow as tf
from tensorflow import keras
from tensorflow.keras.layers import Input, Dense
from tensorflow.keras.models import Model
from tensorflow.keras.optimizers import Adam

# Create a simple discriminator model
discriminator = keras.Sequential([
    Dense(8, activation='relu', input_shape=(4,)),
    Dense(1, activation='sigmoid')
])

# Create a simple generator model
generator = keras.Sequential([
    Dense(8, activation='relu', input_shape=(4,)),
    Dense(4, activation='linear')
])

# Define the input shape
shape = (4,)

# Create an optimizer
optimizer = Adam(learning_rate=0.0002)

ARGS = {
    'discriminator': discriminator,
    'shape': shape,
    'generator': generator,
    'optimizer': optimizer
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
keras, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Functional — a Functional output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Functional 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_network Ran
ran; our contract draft was wrong, not the code
idealo/image-super-resolution/ISR/models/rdn.py
code served (permissive licence) · get_code("9bd62e7608b51355")
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 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 numpy as np

torch.manual_seed(0)

# The function expects a string key from WEIGHTS_URLS
# Valid options are: 'psnr-large', 'psnr-small', 'noise-cancel'
# We'll use one of these valid keys

weights = 'psnr-small'

ARGS = {
    'weights': weights
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy, 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 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_perceptual_loss Ran
ran on a synthesized input
UdbhavPrasad072300/Image-Super-Resolution/src/models/loss.py
code served (permissive licence) · get_code("f398d40c16314567")
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 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 torch.nn as nn
import torch.nn.functional as F

torch.manual_seed(0)

# Create small tensors for recon_x and x
# Both should be the same shape since F.mse_loss compares them element-wise
batch_size = 2
channels = 4

recon_x = torch.randn(batch_size, channels)
x = torch.randn(batch_size, channels)

ARGS = {
    "recon_x": recon_x,
    "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 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
image2tensor Ran
ran on a synthesized input
Lornatang/SRCNN-PyTorch/imgproc.py
code served (permissive licence) · get_code("d22766d95ec24b98")
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 3, dtype family float, shape (3, 4, 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 numpy as np
import torch
from torchvision.transforms import functional as F

torch.manual_seed(0)

# Create a small test image as numpy array with values in [0, 255] range
# Using shape (height, width, channels) as typical for OpenCV imread output
example_image = np.random.randint(0, 256, size=(4, 3, 3), dtype=np.uint8)

ARGS = {
    "image": example_image,
    "range_norm": True,
    "half": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (3, 4, 3) — shape (3, 4, 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
image_resize Ran
ran on a synthesized input
Lornatang/SRCNN-PyTorch/imgproc.py
code served (permissive licence) · get_code("ce1b9b76c304d922")
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 float, shape (8, 10, 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
import math

torch.manual_seed(0)

# Create a small test image (3 channels, 4 height, 5 width)
image_np = np.random.rand(4, 5, 3).astype(np.float32)

# Define arguments for image_resize function
ARGS = {
    'image': image_np,
    'scale_factor': 2.0,
    'antialiasing': True
}
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 float, shape (8, 10, 3) — shape (8, 10, 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
image_to_tensor Ran
ran on a synthesized input
Lornatang/SRGAN-PyTorch/imgproc.py
code served (permissive licence) · get_code("d14280e408db8305")
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 3, dtype family float, shape (3, 4, 6) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import torch

torch.manual_seed(0)

# Create a small image array simulating OpenCV.imread output
# Shape: (height, width, channels) - typical for CV2 images
# Values in range [0, 255] as per function documentation
image = np.random.randint(0, 256, size=(4, 6, 3), dtype=np.uint8)

ARGS = {
    "image": image,
    "range_norm": True,
    "half": False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (3, 4, 6) — shape (3, 4, 6) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
is_binary_file Ran
ran on a synthesized input
shirsenduhalder/SRResGAN-Improved-Perceptual/dataset_helper/common.py
code served (permissive licence) · get_code("4b67a4d963899ffd")
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_binary_file(filename):
    BINARY_EXTENSIONS = ['.npy']
    return any((filename.endswith(extension) for extension in BINARY_EXTENSIONS))

ARGS = {
    'filename': 'data.npy'
}
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
is_image_file Ran
ran, violated the contract we drafted
shirsenduhalder/SRResGAN-Improved-Perceptual/dataset_helper/common.py
pointer only (licence: MIT); the stored copy get_code serves, from sgoldyaev/DeepFashion.ADGAN, is pointer only (licence: NONE) · get_code("ab4109634b75ef8b")
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 sgoldyaev/DeepFashion.ADGAN, 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_image_file Ran
ran, violated the contract we drafted
leftthomas/SRGAN/data_utils.py
code served (permissive licence) · get_code("2383223cfe77b76c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned 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_image_file(filename):
    return any((filename.endswith(extension) for extension in ['.png', '.jpg', '.jpeg', '.PNG', '.JPG', '.JPEG']))

# Test with a valid image filename
ARGS = {
    'filename': 'test_image.png'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
load Ran
ran on a synthesized input
Adk2001tech/GAN-Image-Super-Resolution/utils.py
code served (permissive licence) · get_code("639edf7d62a402c3")
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 (48, 64, 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 os
import cv2
import numpy as np
from PIL import Image
import tempfile

# Create a temporary image file for testing
temp_dir = tempfile.mkdtemp()
temp_image_path = os.path.join(temp_dir, "test_image.png")

# Create a small test image using PIL and save it
test_img = Image.new('RGB', (100, 80), color=(255, 0, 0))
test_img.save(temp_image_path)

# Define arguments for the load function
ARGS = {
    "path": temp_image_path,
    "shape": (64, 48)
}
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 ndarray, ndim 3, dtype family int, shape (48, 64, 3) — shape (48, 64, 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
load_checkpoint Ran
ran on a synthesized input
AntonioAlgaida/Edge.SRGAN/utils.py
code served (permissive licence) · get_code("6a0a16e9c71eb14f")
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. 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 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 torch.nn as nn
import tempfile

torch.manual_seed(0)

# Create a simple model
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Create model instance
model = SimpleModel()

# Create optimizer
optimizer = torch.optim.SGD(model.parameters(), lr=0.01)

# Create a temporary directory and checkpoint file
temp_dir = tempfile.mkdtemp()
ckpts_dir = os.path.join(temp_dir, 'ckpts')
os.makedirs(ckpts_dir, exist_ok=True)

# Save a checkpoint with model and optimizer state
checkpoint_path = os.path.join(ckpts_dir, 'test_checkpoint.pth')
checkpoint_data = {
    'state_dict': model.state_dict(),
    'optim_dict': optimizer.state_dict()
}
torch.save(checkpoint_data, checkpoint_path)

# Change to temp directory so relative path works
original_dir = os.getcwd()
os.chdir(temp_dir)

ARGS = {
    'checkpoint': 'test_checkpoint.pth',
    'model': SimpleModel(),
    'optimizer': torch.optim.SGD(SimpleModel().parameters(), lr=0.01)
}
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 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
load_state_dict Ran
ran on a synthesized input
Lornatang/SRGAN-PyTorch/utils.py
code served (permissive licence) · get_code("08e3b22c15672b97")
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 SimpleModel. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch import nn
from collections import OrderedDict

torch.manual_seed(0)

# Create a simple model
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

# Instantiate the model
model = SimpleModel()

# Create a state dict with matching parameter names and shapes
state_dict = OrderedDict()
state_dict['linear1.weight'] = torch.randn(3, 4)
state_dict['linear1.bias'] = torch.randn(3)
state_dict['linear2.weight'] = torch.randn(2, 3)
state_dict['linear2.bias'] = torch.randn(2)

# Test case 1: non-compiled mode
compile_mode = False

ARGS = {
    'model': model,
    'compile_mode': compile_mode,
    'state_dict': state_dict
}
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 SimpleModel — a SimpleModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleModel 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
mse Ran
ran on a synthesized input
jason-zl190/sisr/trainer/utils/losses.py
code served (permissive licence) · get_code("80be2a8c74edf6d9")
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 1, dtype family float, shape (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 tensorflow as tf
import numpy as np

# Create small tensors for y_true and y_pred
# Using distinct shapes: batch_size=2, features=4
y_true = tf.constant([[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]], dtype=tf.float32)
y_pred = tf.constant([[1.1, 2.1, 2.9, 4.1], [4.9, 6.1, 7.1, 7.9]], dtype=tf.float32)

ARGS = {
    "y_true": y_true,
    "y_pred": y_pred
}
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 1, dtype family float, shape (2,) — shape (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
normalize Ran
ran, honoured the contract we drafted
anujtyagi2802/SRGAN/test_new.py
pointer only (licence: NONE) · get_code("b58ae1ca840194c4")
How it ran

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

normalize Ran
ran on a synthesized input
AntonioAlgaida/Edge.SRGAN/data_loader.py
code served (permissive licence) · get_code("fbb465d24c89e77c")
How it ran

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

import torch
import numpy as np

torch.manual_seed(0)

# Create a small tensor with shape (batch=2, channels=3, height=4, width=4)
# The function expects tensors with at least a second dimension for channels
tensors = torch.randn(2, 3, 4, 4)

ARGS = {
    "tensors": tensors
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 3, 4, 4) — shape (2, 3, 4, 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
parse Ran
ran on a synthesized input
shirsenduhalder/SRResGAN-Improved-Perceptual/options/options.py
code served (permissive licence) · get_code("971e71ea279782e6")
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 OrderedDict. 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 tempfile
import os
from collections import OrderedDict

# Create a temporary JSON config file with valid syntax
temp_dir = tempfile.mkdtemp()
config_path = os.path.join(temp_dir, 'config.json')

config_content = """{
    // This is a comment that should be stripped
    "scale": 4,
    "rgb_range": 255,
    "datasets": {
        "train_phase": {
            "name": "training_dataset",
            "path": "/path/to/train"
        },
        "val_phase": {
            "name": "validation_dataset",
            "path": "/path/to/val"
        }
    }
}
"""

with open(config_path, 'w') as f:
    f.write(config_content)

ARGS = {
    'opt_path': config_path
}
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 OrderedDict — a OrderedDict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a OrderedDict 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
pixel_shuffle Ran
ran on a synthesized input
srikanthmandru/Image-Super-Resolution-SRGAN/srgan_model_py.py
code served (permissive licence) · get_code("c8d3363d1625adc6")
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 tensorflow as tf
import numpy as np

def pixel_shuffle(scale):
    return lambda x: tf.nn.depth_to_space(x, scale)

# Create a small test tensor
# depth_to_space expects input shape: [batch, height, width, depth]
# We'll create a tensor with batch=2, height=2, width=2, depth=16
# This allows scale=2 to work (depth must be divisible by scale^2)
input_tensor = tf.constant(np.random.randn(2, 2, 2, 16).astype(np.float32))

# Test the function
scale = 2

ARGS = {
    "scale": scale
}
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 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
predict_function Ran
ran on a synthesized input
srikanthmandru/Image-Super-Resolution-SRGAN/predictions_utils.py
code served (permissive licence) · get_code("9049b2ff05471596")
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 float, shape (2, 4, 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 numpy as np
import tensorflow.compat.v1 as tf
import tempfile
import os

# Disable TF v2 behavior
tf.disable_v2_behavior()

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

# Build a simple SavedModel for testing
def create_dummy_saved_model(model_path):
    """Create a minimal SavedModel with serving signature"""
    tf.reset_default_graph()
    
    # Create input and output tensors
    x = tf.placeholder(tf.float32, shape=[None, 4, 3], name='feature_input')
    y = tf.identity(x, name='output_op')
    
    # Create session and save the model
    with tf.Session() as sess:
        sess.run(tf.global_variables_initializer())
        
        # Define signature
        tensor_info_x = tf.saved_model.utils.build_tensor_info(x)
        tensor_info_y = tf.saved_model.utils.build_tensor_info(y)
        
        prediction_signature = (
            tf.saved_model.signature_def_utils.build_signature_def(
                inputs={'feature': tensor_info_x},
                outputs={'output': tensor_info_y},
                method_name=tf.saved_model.signature_constants.PREDICT_METHOD_NAME
            )
        )
        
        builder = tf.saved_model.builder.SavedModelBuilder(model_path)
        builder.add_meta_graph_and_variables(
            sess,
            [tf.saved_model.tag_constants.SERVING],
            signature_def_map={
                tf.saved_model.signature_constants.DEFAULT_SERVING_SIGNATURE_DEF_KEY:
                    prediction_signature
            }
        )
        builder.save()

# Create the model
model_path = os.path.join(temp_dir, 'dummy_model')
create_dummy_saved_model(model_path)

# Create dummy image data - batch of 2 images with shape (4, 3)
numpy_imgs = np.random.randn(2, 4, 3).astype(np.float32)

ARGS = {
    'numpy_imgs': numpy_imgs,
    'model_path': model_path
}
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 ndarray, ndim 3, dtype family float, shape (2, 4, 3) — shape (2, 4, 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
preprocess_load Ran
ran on a synthesized input
srikanthmandru/Image-Super-Resolution-SRGAN/preprocess_file_py_backup.py
code served (permissive licence) · get_code("b5e36a89b1e68898")
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 _ZipDataset. 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 tensorflow as tf

# Create a temporary directory structure for testing
temp_dir = tempfile.mkdtemp()
example_dir = os.path.join(temp_dir, 'example_images')
os.makedirs(os.path.join(example_dir, 'highres'), exist_ok=True)
os.makedirs(os.path.join(example_dir, 'lowres'), exist_ok=True)

# Create a temporary images directory with dummy JPEG files
images_dir = os.path.join(temp_dir, 'images')
os.makedirs(images_dir, exist_ok=True)

# Create small dummy JPEG files for testing
import numpy as np
from PIL import Image

for i in range(2):
    # Create a small dummy image (2048x1080 as per original_image_shape)
    img_array = np.random.randint(0, 256, (1080, 2048, 3), dtype=np.uint8)
    img = Image.fromarray(img_array)
    img.save(os.path.join(images_dir, f'image_{i}.jpg'))

# Define ARGS dictionary with all required parameters
ARGS = {
    'root_path': temp_dir + '/',
    'hr_image_shape': (256, 256),
    'lr_image_shape': (64, 64),
    'original_image_shape': (2048, 1080),
    'show_images': False,
    'data_path': 'images/*.jpg'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, matplotlib, numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type _ZipDataset — a _ZipDataset output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a _ZipDataset 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
psnr Ran
ran, honoured the contract we drafted
teakkkz/imageSR/models.py
pointer only (licence: NONE) · get_code("f4eb7942f27c6efc")
How it ran

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

random_crop Ran
ran on a synthesized input
AntonioAlgaida/Edge.SRGAN/data_loader.py
code served (permissive licence) · get_code("b87fd84eaccca1ef")
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.

from PIL import Image
import numpy as np
import random

# Set seed for reproducibility
random.seed(0)
np.random.seed(0)

# Create HQ image (high quality) - larger image
# PIL Image requires mode and size, then we convert to numpy-like object
# The function calls .crop() and .copy() on both HQ and LQ, so they must be PIL Images
HQ = Image.new('RGB', (160, 120), color='red')  # 160x120 pixels (scale=4, so 40x30 in LQ space)

# Create LQ image (low quality) - smaller image
# patch_size will be 16, so LQ needs to be at least 16x16
LQ = Image.new('RGB', (40, 30), color='blue')  # 40x30 pixels

patch_size = 16
scale = 4

ARGS = {
    'HQ': HQ,
    'LQ': LQ,
    'patch_size': patch_size,
    'scale': scale
}
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 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
rgb2ycbcr Ran
ran on a synthesized input
shirsenduhalder/SRResGAN-Improved-Perceptual/eval_save.py
code served (permissive licence) · get_code("1c66afe7eb5e75e7")
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 1, dtype family int, shape (4,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create a small RGB image array
# Shape: (4, 3) - 4 pixels with 3 RGB channels
# Using uint8 type (standard for images)
img = np.array([
    [255, 128, 64],
    [200, 100, 50],
    [150, 75, 25],
    [100, 50, 10]
], dtype=np.uint8)

ARGS = {
    "img": img,
    "only_y": True
}
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 1, dtype family int, shape (4,) — shape (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
rgb2ycbcr Ran
ran on a synthesized input
shirsenduhalder/SRResGAN-Improved-Perceptual/utils.py
code served (permissive licence) · get_code("34c8db6f71ff9ab1")
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 1, dtype family int, shape (4,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Test case 1: uint8 input with only_y=True
img_uint8 = np.random.randint(0, 256, size=(4, 3), dtype=np.uint8)

ARGS = {
    "img": img_uint8,
    "only_y": True
}
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 1, dtype family int, shape (4,) — shape (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
swish Ran
ran; our contract draft was wrong, not the code
fengye-lu/PyTorch-SRGAN/models.py
pointer only (licence: GPL-3.0) · get_code("31117990d4f24fdf")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, fengye-lu/PyTorch-SRGAN, is not in the permissive set Syntology serves inline. 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.

tensor2image Ran
ran on a synthesized input
Lornatang/SRCNN-PyTorch/imgproc.py
code served (permissive licence) · get_code("dd73a13fd75b72d0")
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 (4, 5, 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 NCHW tensor with values in [0, 1] range
# N=1 (batch), C=3 (channels), H=4 (height), W=5 (width)
tensor = torch.rand(1, 3, 4, 5)

ARGS = {
    "tensor": tensor,
    "range_norm": False,
    "half": False
}
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 (4, 5, 3) — shape (4, 5, 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
tensor_to_image Ran
ran on a synthesized input
Lornatang/SRGAN-PyTorch/imgproc.py
code served (permissive licence) · get_code("00afe15c4a0c8764")
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 (4, 5, 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 in NCHW format
# N=1 (batch), C=3 (channels), H=4 (height), W=5 (width)
# Values in range [0, 1]
tensor = torch.rand(1, 3, 4, 5)

ARGS = {
    "tensor": tensor,
    "range_norm": False,
    "half": False,
}
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 (4, 5, 3) — shape (4, 5, 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
tileImage Ran
ran on a synthesized input
itsuki8914/srresnet4x/srres.py
code served (permissive licence) · get_code("4f3b6ad36a5acd58")
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 float, shape (16, 12, 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 numpy as np
import math

# Create a small batch of images
# The function expects imgs.shape[0] to be the batch size
# and imgs[0] to have shape (height, width, 3) for RGB images

batch_size = 4
height = 8
width = 6
num_channels = 3

# Create random images as float32 arrays
imgs = np.random.rand(batch_size, height, width, num_channels).astype(np.float32)

ARGS = {
    'imgs': imgs
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, 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 float, shape (16, 12, 3) — shape (16, 12, 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
train_hr_transform Ran
ran on a synthesized input
leftthomas/SRGAN/data_utils.py
code served (permissive licence) · get_code("d6cfda8786be7809")
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
import torch.nn as nn
from torchvision.transforms import Compose, RandomCrop, ToTensor, ToPILImage, CenterCrop, Resize

torch.manual_seed(0)

ARGS = {
    "crop_size": 32
}
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
ycbcr2rgb Ran
ran on a synthesized input
shirsenduhalder/SRResGAN-Improved-Perceptual/utils.py
code served (permissive licence) · get_code("7f34ee348973f67f")
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 (2, 4, 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 numpy as np

# Create a small YCbCr image array for testing
# YCbCr typically has shape (height, width, 3) or (batch, height, width, 3)
# Using a small 2x4x3 array (2 rows, 4 columns, 3 channels)
img_uint8 = np.array([
    [[16, 128, 128], [32, 100, 150], [64, 120, 110], [128, 140, 100]],
    [[50, 128, 128], [100, 110, 140], [150, 130, 120], [200, 150, 100]]
], dtype=np.uint8)

ARGS = {
    "img": img_uint8
}
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 (2, 4, 3) — shape (2, 4, 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
Fvp Not yet run
unverified (harvested, no recorded run)
shirsenduhalder/SRResGAN-Improved-Perceptual/basic_utils.py
code served (permissive licence) · get_code("18c00e3213b07550")
How it ran

no invocation recorded.

accuracy Not yet run
unverified (harvested, no recorded run)
jason-zl190/sisr/trainer/utils/losses.py
code served (permissive licence) · get_code("6a2fc18229537c5a")
How it ran

no invocation recorded.

buildSRGAN_g Not yet run
unverified (harvested, no recorded run)
itsuki8914/srresnet4x/model.py
code served (permissive licence) · get_code("5cba0d6ea119693c")
How it ran

no invocation recorded.

content_loss Not yet run
unverified (harvested, no recorded run)
srikanthmandru/Image-Super-Resolution-SRGAN/loss_function_utils.py
code served (permissive licence) · get_code("3493389d55781403")
How it ran

no invocation recorded.

get_best_parameters Not yet run
unverified (harvested, no recorded run)
srikanthmandru/Image-Super-Resolution-SRGAN/model_utils.py
code served (permissive licence) · get_code("9ca600a523822ffe")
How it ran

no invocation recorded.

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

Also present in other papers' code

Of 72 samples lifted from this paper's linked repositories, 72 carry a function identity and 0 do not. Of the 72 distinct functions with an identity, 20 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 3 the same month, 17 later) and 52 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
is_image_file 62 other papers
62 later
1703.07511 (2017-03)
Deep Photo Style Transfer
1710.10916 (2017-10)
StackGAN++: Realistic Image Synthesis with Stacked Generative Adversarial Networks
1802.06474 (2018-02)
A Closed-form Solution to Photorealistic Image Stylization
and 59 more not named here
add_argument_group 27 other papers
2 dated earlier, 25 later
1406.6247 (2014-06)
Recurrent Models of Visual Attention
1506.03134 (2015-06)
Pointer Networks
1611.01578 (2016-11)
Neural Architecture Search with Reinforcement Learning
and 24 more not named here
dict_to_nonedict 19 other papers
19 later
1905.02716 (2019-05)
EDVR: Video Restoration with Enhanced Deformable Convolutional Networks
2006.14200 (2020-06)
SRFlow: Learning the Super-Resolution Space with Normalizing Flow
ijcai2022_0196 (2022 (year only))
KUNet: Imaging Knowledge-Inspired Single HDR Image Reconstruction
and 16 more not named here
is_image_file 4 other papers
4 later
1911.07850 (2019-11)
Frequency Separation for Real-World Super-Resolution
2104.10338 (2021-04)
Shadow Generation for Composite Image in Real-world Scenes
2306.16699 (2023-06)
Rapid-INR: Storage Efficient CPU-free DNN Training Using Implicit Neural Representation
and 1 more not named here
calculate_valid_crop_size 3 other papers
1 the same month, 2 later
1609.05158 (2016-09)
Real-Time Single Image and Video Super-Resolution Using an Efficient Sub-Pixel Convolutional Neural Network
1802.08797 (2018-02)
Residual Dense Network for Image Super-Resolution
1911.07850 (2019-11)
Frequency Separation for Real-World Super-Resolution
adjust_learning_rate 2 other papers
2 later
2405.02843 (2024-05)
Residual-Conditioned Optimal Transport: Towards Structure-Preserving Unpaired and Paired Image Restoration
2411.01656 (2024-11)
Degradation-Aware Residual-Conditioned Optimal Transport for Unified Image Restoration
image2tensor 2 other papers
2 later
1807.02758 (2018-07)
Image Super-Resolution Using Very Deep Residual Channel Attention Networks
2005.12597 (2020-05)
Perceptual Extreme Super Resolution Network with Receptive Field Block
image_resize 2 other papers
2 later
1807.02758 (2018-07)
Image Super-Resolution Using Very Deep Residual Channel Attention Networks
2005.12597 (2020-05)
Perceptual Extreme Super Resolution Network with Receptive Field Block
image_to_tensor 2 other papers
2 later
1809.00219 (2018-09)
ESRGAN: Enhanced Super-Resolution Generative Adversarial Networks
1903.00875 (2019-03)
Meta-SR: A Magnification-Arbitrary Network for Super-Resolution
tensor2image 2 other papers
2 later
1807.02758 (2018-07)
Image Super-Resolution Using Very Deep Residual Channel Attention Networks
2005.12597 (2020-05)
Perceptual Extreme Super Resolution Network with Receptive Field Block
tensor_to_image 2 other papers
2 later
1809.00219 (2018-09)
ESRGAN: Enhanced Super-Resolution Generative Adversarial Networks
1903.00875 (2019-03)
Meta-SR: A Magnification-Arbitrary Network for Super-Resolution
extend 1 other paper
1 the same month
1609.05158 (2016-09)
Real-Time Single Image and Video Super-Resolution Using an Efficient Sub-Pixel Convolutional Neural Network
get_network 1 other paper
1 later
1802.08797 (2018-02)
Residual Dense Network for Image Super-Resolution
load_pretrained_state_dict 1 other paper
1 later
1809.00219 (2018-09)
ESRGAN: Enhanced Super-Resolution Generative Adversarial Networks
load_state_dict 1 other paper
1 later
1809.00219 (2018-09)
ESRGAN: Enhanced Super-Resolution Generative Adversarial Networks
pixel_shuffle 1 other paper
1 the same month
1609.05158 (2016-09)
Real-Time Single Image and Video Super-Resolution Using an Efficient Sub-Pixel Convolutional Neural Network
preprocess_one_image 1 other paper
1 later
1809.00219 (2018-09)
ESRGAN: Enhanced Super-Resolution Generative Adversarial Networks
psnr 1 other paper
1 dated earlier
1501.00092 (2015-01)
Image Super-Resolution Using Deep Convolutional Networks
swish 1 other paper
1 later
1710.05941 (2017-10)
SEARCHING FOR ACTIVATION FUNCTIONS
test_data_loader 1 other paper
1 later
1611.07004 (2016-11)
Image-to-Image Translation with Conditional Adversarial Networks

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

Repositories linked to this paper

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

Despite the breakthroughs in accuracy and speed of single image super-resolution using faster and deeper convolutional neural networks, one central problem remains largely unsolved: how do we recover the finer texture details when we super-resolve at large upscaling factors? The behavior of optimization-based super-resolution methods is principally driven by the choice of the objective function. Recent work has largely focused on minimizing the mean squared reconstruction error. The resulting estimates have high peak signal-to-noise ratios, but they are often lacking high-frequency details and are perceptually unsatisfying in the sense that they fail to match the fidelity expected at the higher resolution. In this paper, we present SRGAN, a generative adversarial network (GAN) for image super-resolution (SR). To our knowledge, it is the first framework capable of inferring photo-realistic natural images for 4x upscaling factors. To achieve this, we propose a perceptual loss function which consists of an adversarial loss and a content loss. The adversarial loss pushes our solution to the natural image manifold using a discriminator network that is trained to differentiate between the super-resolved images and original photo-realistic images. In addition, we use a content loss motivated by perceptual similarity instead of similarity in pixel space. Our deep residual network is able to recover photo-realistic textures from heavily downsampled images on public benchmarks. An extensive mean-opinion-score (MOS) test shows hugely significant gains in perceptual quality using SRGAN. The MOS scores obtained with SRGAN are closer to those of the original high-resolution images than to those obtained with any state-of-the-art method.

For agents

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

get_harvested_code_for_paper("1609.04802")
get_code_for_paper("1609.04802")
have("1609.04802")

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

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

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

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

Connect an agent — have() is free.