SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1804.01622 · 2018

Image Generation from Scene Graphs

arXiv · PDF · Open in the Atlas

Code that ran

20 of 21 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; 0 honoured the contract we drafted, 0 violated it and 13 have no contract verdict; 7 failures of our instrument; 1 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/1804.01622.json · badge: /api/ran/1804.01622.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
google/sg2im community (classifier label)
classifier basis not recorded on the link
20 ran · 1 no recorded run
FunctionStatusWhere it lives
apply_box_transform Ran
ran on a synthesized input
google/sg2im/sg2im/box_utils.py
code served (permissive licence) · get_code("bbfc6fccb2deb17b")
How it ran

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

import torch

torch.manual_seed(0)

# Create sample anchor boxes of shape (N, 4) in format [xc, yc, w, h]
# N=2 for small batch size
anchors = torch.tensor([
    [10.0, 20.0, 5.0, 8.0],
    [30.0, 40.0, 10.0, 12.0]
], dtype=torch.float32)

# Create sample box transforms of shape (N, 4) in format [tx, ty, tw, th]
# N=2 matching anchors batch size
transforms = torch.tensor([
    [0.1, 0.2, 0.05, 0.1],
    [-0.1, 0.15, -0.08, 0.12]
], dtype=torch.float32)

ARGS = {
    "anchors": anchors,
    "transforms": transforms
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
bce_loss Ran
ran; our contract draft was wrong, not the code
google/sg2im/sg2im/losses.py
code served (permissive licence) · get_code("ae92b5ed5c527664")
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

torch.manual_seed(0)

# Create small tensors for input and target
# input: scores (logits) for binary classification
# target: ground truth labels (0 or 1)
batch_size = 2
input_tensor = torch.randn(batch_size)
target_tensor = torch.randint(0, 2, (batch_size,)).float()

ARGS = {
    "input": input_tensor,
    "target": target_tensor,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
boxes_to_layout Ran
ran; our contract draft was wrong, not the code
google/sg2im/sg2im/layout.py
code served (permissive licence) · get_code("f37f84bce6a380cf")
How it ran

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

torch.manual_seed(0)

# Define the arguments for boxes_to_layout
O = 2  # number of objects
D = 4  # vector dimension
N = 2  # number of images
H = 8  # output height
W = 8  # output width

# vecs: Tensor of shape (O, D) giving vectors
vecs = torch.randn(O, D)

# boxes: Tensor of shape (O, 4) giving bounding boxes in [x0, y0, x1, y1] format in [0, 1]
boxes = torch.tensor([
    [0.1, 0.2, 0.5, 0.7],
    [0.3, 0.1, 0.9, 0.6]
], dtype=torch.float32)

# obj_to_img: LongTensor of shape (O,) mapping each object to an image
obj_to_img = torch.tensor([0, 1], dtype=torch.long)

ARGS = {
    'vecs': vecs,
    'boxes': boxes,
    'obj_to_img': obj_to_img,
    'H': H,
    'W': W,
    'pooling': 'sum'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 4, 8, 8) — shape (2, 4, 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
build_cnn Ran
ran on a synthesized input
google/sg2im/sg2im/layers.py
code served (permissive licence) · get_code("be7d98c8795b76d3")
How it ran

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

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'arch': ['I3', 'C3-16', 'C3-32-2', 'R', 'U2', 'P2', 'FC-128-10'],
    'normalization': 'batch',
    'activation': 'relu',
    'padding': 'same',
    'pooling': 'max',
    'init': 'default'
}
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 — 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
centers_to_extents Ran
ran on a synthesized input
google/sg2im/sg2im/box_utils.py
code served (permissive licence) · get_code("e511231aa813e416")
How it ran

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

import torch

torch.manual_seed(0)

# Create a small batch of boxes in [xc, yc, w, h] format
# N=2 boxes, each with 4 values
boxes = torch.tensor([
    [10.0, 20.0, 4.0, 6.0],
    [30.0, 40.0, 8.0, 10.0]
], dtype=torch.float32)

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

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

torch.manual_seed(0)

# Create small feature tensors: (N=2, C=4, H=8, W=6)
feats = torch.randn(2, 4, 8, 6)

# Create bounding boxes: (N=2, 4) with values in [0, 1]
# Format: [x0, y0, x1, y1]
bbox = torch.tensor([
    [0.1, 0.2, 0.8, 0.9],
    [0.2, 0.1, 0.7, 0.8]
])

# Output crop height and width
HH = 5
WW = 7

# Backend option
backend = 'jj'

ARGS = {
    'feats': feats,
    'bbox': bbox,
    'HH': HH,
    'WW': WW,
    'backend': backend
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 4, 5, 7) — shape (2, 4, 5, 7) 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
crop_bbox_batch Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
google/sg2im/sg2im/bilinear.py
code served (permissive licence) · get_code("8688d7053f5c0967")
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 (3, 4, 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)

# Build tiny tensors for the function
N = 2  # number of feature maps
C = 4  # number of channels
H = 8  # height of feature maps
W = 6  # width of feature maps
B = 3  # number of bounding boxes
HH = 4  # output crop height
WW = 3  # output crop width

# feats: (N, C, H, W)
feats = torch.randn(N, C, H, W)

# bbox: (B, 4) with coordinates in [0, 1]
bbox = torch.rand(B, 4)
# Ensure x0 < x1 and y0 < y1
bbox[:, 2] = bbox[:, 2] + 0.5  # x1 > x0
bbox[:, 3] = bbox[:, 3] + 0.5  # y1 > y0
bbox = torch.clamp(bbox, 0, 1)

# bbox_to_feats: (B,) mapping each bbox to a feature map index
bbox_to_feats = torch.tensor([0, 1, 0], dtype=torch.long)

ARGS = {
    'feats': feats,
    'bbox': bbox,
    'bbox_to_feats': bbox_to_feats,
    'HH': HH,
    'WW': WW,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (3, 4, 4, 3) — shape (3, 4, 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
crop_bbox_batch_cudnn Ran
ran; our contract draft was wrong, not the code
google/sg2im/sg2im/bilinear.py
code served (permissive licence) · get_code("7e52be356aeb8407")
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 (4, 3, 4, 5) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create small tensors for the function
N = 2  # number of feature maps
C = 3  # number of channels
H = 8  # height of feature maps
W = 6  # width of feature maps
B = 4  # number of bounding boxes
HH = 4  # output crop height
WW = 5  # output crop width

# feats: (N, C, H, W)
feats = torch.randn(N, C, H, W)

# bbox: (B, 4) with coordinates in [0, 1]
bbox = torch.rand(B, 4)
# Ensure x0 < x1 and y0 < y1
bbox[:, 2] = torch.max(bbox[:, 2], bbox[:, 0] + 0.1)
bbox[:, 3] = torch.max(bbox[:, 3], bbox[:, 1] + 0.1)

# bbox_to_feats: (B,) mapping each bbox to a feature map index
bbox_to_feats = torch.tensor([0, 1, 0, 1], dtype=torch.long)

ARGS = {
    'feats': feats,
    'bbox': bbox,
    'bbox_to_feats': bbox_to_feats,
    'HH': HH,
    'WW': WW,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (4, 3, 4, 5) — shape (4, 3, 4, 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
float_tuple Ran
ran on a synthesized input
google/sg2im/sg2im/utils.py
code served (permissive licence) · get_code("5e3086197586c014")
How it ran

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

import torch
import numpy as np

torch.manual_seed(0)

# Analyze the function:
# def float_tuple(s):
#     return tuple((float(i) for i in s.split(',')))
# 
# This function takes a single parameter 's' which is a string.
# It splits the string by commas and converts each element to float.
# Then returns a tuple of those floats.

# The parameter 's' should be a string containing comma-separated numbers
s = "1.5,2.3,3.7,4.1"

ARGS = {
    's': s
}
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 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
gan_g_loss Ran
ran; our contract draft was wrong, not the code
google/sg2im/sg2im/losses.py
code served (permissive licence) · get_code("bea7eab39b0f3e75")
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

torch.manual_seed(0)

# Create a tensor of scores for fake samples
# Shape (N,) where N=2 for a small batch
scores_fake = torch.randn(2)

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

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'name': 'leakyrelu-0.2'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type LeakyReLU — a LeakyReLU output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a LeakyReLU 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_gan_losses Ran
ran; our contract draft was wrong, not the code
google/sg2im/sg2im/losses.py
code served (permissive licence) · get_code("ee94d6adfea70511")
How it ran

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

import torch

torch.manual_seed(0)

ARGS = {
    'gan_type': 'gan'
}
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
get_normalization_2d Ran
ran on a synthesized input
google/sg2im/sg2im/layers.py
code served (permissive licence) · get_code("481b0a0e44bbea29")
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 BatchNorm2d. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# The function takes two parameters:
# 1. channels: an integer representing the number of channels
# 2. normalization: a string specifying the normalization type

# Test with a valid number of channels and a valid normalization type
ARGS = {
    'channels': 64,
    'normalization': 'batch'
}
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 BatchNorm2d — a BatchNorm2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a BatchNorm2d 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_total_norm Ran
ran on a synthesized input
google/sg2im/sg2im/metrics.py
code served (permissive licence) · get_code("86ef0f4c4c0c2702")
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

torch.manual_seed(0)

# Create a simple model with parameters that have gradients
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):
        return self.linear2(self.linear1(x))

model = SimpleModel()

# Create some dummy input and output to compute gradients
x = torch.randn(2, 4)
y = torch.randn(2, 2)

# Forward pass and compute loss
output = model(x)
loss = nn.MSELoss()(output, y)

# Backward pass to populate gradients
loss.backward()

# Get model parameters (they now have .grad attributes)
parameters = list(model.parameters())

ARGS = {
    "parameters": parameters,
    "norm_type": 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
int_tuple Ran
ran on a synthesized input
google/sg2im/sg2im/utils.py
code served (permissive licence) · get_code("c7a0b110ef7c5e03")
How it ran

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

import torch
import numpy as np

def int_tuple(s):
    return tuple((int(i) for i in s.split(',')))

ARGS = {
    's': '1,2,3,4,5'
}
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 tuple, ndim 1, dtype family int — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
intersection Ran
ran on a synthesized input
google/sg2im/sg2im/metrics.py
code served (permissive licence) · get_code("6d89e132179f2fbd")
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 (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 torch

torch.manual_seed(0)

# Create two batches of bounding boxes
# Each bbox has format [x1, y1, x2, y2]
# Batch size: 2, each bbox has 4 coordinates
bbox_pred = torch.tensor([
    [1.0, 1.0, 5.0, 5.0],
    [2.0, 2.0, 6.0, 6.0]
], dtype=torch.float32)

bbox_gt = torch.tensor([
    [3.0, 3.0, 7.0, 7.0],
    [1.5, 1.5, 4.5, 4.5]
], dtype=torch.float32)

ARGS = {
    "bbox_pred": bbox_pred,
    "bbox_gt": bbox_gt
}
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 (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
invert_box_transform Ran
ran on a synthesized input
google/sg2im/sg2im/box_utils.py
code served (permissive licence) · get_code("fc8f66fb9b6df96b")
How it ran

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

import torch

torch.manual_seed(0)

# Create small tensors for anchors and boxes
# anchors shape: (N, 4) in format [xc, yc, w, h]
# boxes shape: (N, 4) in format [xc, yc, w, h]
# Using N=2 for batch size

anchors = torch.tensor([
    [10.0, 20.0, 5.0, 8.0],
    [30.0, 40.0, 10.0, 15.0]
], dtype=torch.float32)

boxes = torch.tensor([
    [12.0, 22.0, 6.0, 9.0],
    [32.0, 42.0, 11.0, 16.0]
], dtype=torch.float32)

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

torch.manual_seed(0)

# Create two small batches of bounding boxes
# Format: [x_min, y_min, x_max, y_max]
bbox_pred = torch.tensor([
    [1.0, 1.0, 5.0, 5.0],
    [2.0, 2.0, 6.0, 6.0]
], dtype=torch.float32)

bbox_gt = torch.tensor([
    [2.0, 2.0, 6.0, 6.0],
    [3.0, 3.0, 7.0, 7.0]
], dtype=torch.float32)

ARGS = {
    "bbox_pred": bbox_pred,
    "bbox_gt": bbox_gt
}
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
masks_to_layout Ran
ran on a synthesized input
google/sg2im/sg2im/layout.py
code served (permissive licence) · get_code("9aaef561ce9bb1be")
How it ran

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

torch.manual_seed(0)

# Define parameters for masks_to_layout
O = 2  # number of objects
D = 4  # dimension of vectors
M = 3  # mask size
N = 2  # number of images
H = 8  # output height
W = 6  # output width

# vecs: Tensor of shape (O, D)
vecs = torch.randn(O, D)

# boxes: Tensor of shape (O, 4) in [0, 1] coordinate space
boxes = torch.tensor([
    [0.1, 0.2, 0.5, 0.6],
    [0.4, 0.3, 0.9, 0.8]
], dtype=torch.float32)

# masks: Tensor of shape (O, M, M) - binary masks
masks = torch.randint(0, 2, (O, M, M), dtype=torch.float32)

# obj_to_img: LongTensor of shape (O,) mapping objects to images
obj_to_img = torch.tensor([0, 1], dtype=torch.long)

ARGS = {
    'vecs': vecs,
    'boxes': boxes,
    'masks': masks,
    'obj_to_img': obj_to_img,
    'H': H,
    'W': W,
    'pooling': 'sum'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 4, 8, 6) — shape (2, 4, 8, 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
str_tuple Ran
ran on a synthesized input
google/sg2im/sg2im/utils.py
code served (permissive licence) · get_code("ec5493a698745a69")
How it ran

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

import torch

ARGS = {
    's': 'hello,world,test'
}
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
draw_scene_graph Not yet run
unverified (harvested, no recorded run)
google/sg2im/sg2im/vis.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from yangling0818/sgdiff, is pointer only (licence: NONE) · get_code("08c9ee87b8be3253")
How it ran

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

Also present in other papers' code

Of 21 samples lifted from this paper's linked repositories, 21 carry a function identity and 0 do not. Of the 21 distinct functions with an identity, 15 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 14 later) and 6 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
bce_loss 3 other papers
1 dated earlier, 2 later
1803.10892 (2018-03)
Social GAN: Socially Acceptable Trajectories with Generative Adversarial Networks
1909.05379 (2019-09)
Specifying Object Attributes and Relations in Interactive Scene Generation
1912.07414 (2019-12)
Learning Canonical Representations for Scene Graph to Image Generation
int_tuple 3 other papers
1 dated earlier, 2 later
1803.10892 (2018-03)
Social GAN: Socially Acceptable Trajectories with Generative Adversarial Networks
1909.05379 (2019-09)
Specifying Object Attributes and Relations in Interactive Scene Generation
2111.14820 (2021-11)
Towards Robust and Adaptive Motion Forecasting: A Causal Representation Perspective
crop_bbox 2 other papers
2 later
1909.05379 (2019-09)
Specifying Object Attributes and Relations in Interactive Scene Generation
2601.12876 (2026-01)
Exploring Talking Head Models With Adjacent Frame Prior for Speech-Preserving Facial Expression Manipulation
crop_bbox_batch 2 other papers
2 later
1909.05379 (2019-09)
Specifying Object Attributes and Relations in Interactive Scene Generation
2601.12876 (2026-01)
Exploring Talking Head Models With Adjacent Frame Prior for Speech-Preserving Facial Expression Manipulation
crop_bbox_batch_cudnn 2 other papers
2 later
1909.05379 (2019-09)
Specifying Object Attributes and Relations in Interactive Scene Generation
2601.12876 (2026-01)
Exploring Talking Head Models With Adjacent Frame Prior for Speech-Preserving Facial Expression Manipulation
gan_g_loss 2 other papers
2 later
1909.05379 (2019-09)
Specifying Object Attributes and Relations in Interactive Scene Generation
1912.07414 (2019-12)
Learning Canonical Representations for Scene Graph to Image Generation
get_gan_losses 2 other papers
2 later
1909.05379 (2019-09)
Specifying Object Attributes and Relations in Interactive Scene Generation
1912.07414 (2019-12)
Learning Canonical Representations for Scene Graph to Image Generation
boxes_to_layout 1 other paper
1 later
1909.05379 (2019-09)
Specifying Object Attributes and Relations in Interactive Scene Generation
draw_scene_graph 1 other paper
1 later
2412.08580 (2024-12)
LAION-SG: An Enhanced Large-Scale Dataset for Training Complex Image-Text Models with Structural Annotations
float_tuple 1 other paper
1 later
1909.05379 (2019-09)
Specifying Object Attributes and Relations in Interactive Scene Generation
get_activation 1 other paper
1 later
1909.05379 (2019-09)
Specifying Object Attributes and Relations in Interactive Scene Generation
get_normalization_2d 1 other paper
1 later
1909.05379 (2019-09)
Specifying Object Attributes and Relations in Interactive Scene Generation
get_total_norm 1 other paper
1 dated earlier
1803.10892 (2018-03)
Social GAN: Socially Acceptable Trajectories with Generative Adversarial Networks
intersection 1 other paper
1 later
1909.05379 (2019-09)
Specifying Object Attributes and Relations in Interactive Scene Generation
str_tuple 1 other paper
1 later
1909.05379 (2019-09)
Specifying Object Attributes and Relations in Interactive Scene Generation

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

Repositories linked to this paper

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

Abstract

To truly understand the visual world our models should be able not only to recognize images but also generate them. To this end, there has been exciting recent progress on generating images from natural language descriptions. These methods give stunning results on limited domains such as descriptions of birds or flowers, but struggle to faithfully reproduce complex sentences with many objects and relationships. To overcome this limitation we propose a method for generating images from scene graphs, enabling explicitly reasoning about objects and their relationships. Our model uses graph convolution to process input graphs, computes a scene layout by predicting bounding boxes and segmentation masks for objects, and converts the layout to an image with a cascaded refinement network. The network is trained adversarially against a pair of discriminators to ensure realistic outputs. We validate our approach on Visual Genome and COCO-Stuff, where qualitative results, ablations, and user studies demonstrate our method's ability to generate complex images with multiple objects.

For agents

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

get_harvested_code_for_paper("1804.01622")
get_code_for_paper("1804.01622")
have("1804.01622")

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

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

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

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

Connect an agent — have() is free.