SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1601.06759 · 2016

Pixel Recurrent Neural Networks Aäron van den Oord

Nal Kalchbrenner, Koray Kavukcuoglu, Aaron van den Oord

arXiv · PDF · Open in the Atlas

Code that ran

19 of 29 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (8 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 16 have no contract verdict; 2 failures of our instrument; 10 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/1601.06759.json · badge: /api/ran/1601.06759.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
anordertoreclaim/PixelCNN community
Papers with Code archive
4 ran · 1 no recorded run
ardapekis/pixel-rnn community
Papers with Code archive
3 ran · 0 no recorded run
kamenbliznashki/pixel_models community
Papers with Code archive
3 ran · 0 no recorded run
encoreus/gs-jacobi_for_tarflow community
Papers with Code archive
2 ran · 2 no recorded run
apple/ml-tarflow community
Papers with Code archive
2 ran · 2 no recorded run
singh-hrituraj/PixelCNN-Pytorch community
Papers with Code archive
2 ran · 0 no recorded run
davidemartinelli/PixelCNN community
Papers with Code archive
1 ran · 2 no recorded run
sarus-tech/tf2-published-models community
Papers with Code archive
1 ran · 2 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
vocong25/gated_pixelcnn community
Papers with Code archive
0 ran · 1 no recorded run
FunctionStatusWhere it lives
Attention Ran
ran on a synthesized input
encoreus/gs-jacobi_for_tarflow/GS_Jacobi_sampling.py
code served (permissive licence) · get_code("ee4de74c78e0ecd2")
How it ran

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

import torch
import numpy as np

# INIT_ARGS for Attention.__init__(in_channels: int, head_channels: int)
INIT_ARGS = {
    'in_channels': 8,
    'head_channels': 4
}

# ARGS for Attention.forward(x: torch.Tensor, mask: torch.Tensor | None=None, temp: float=1.0, which_cache: str='cond')
ARGS = {
    'x': torch.randn(2, 5, 8),  # (batch=2, seq_len=5, channels=8)
    'mask': None,
    'temp': 1.0,
    'which_cache': 'cond'
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
AttentionBlock Ran
ran on a synthesized input
apple/ml-tarflow/transformer_flow.py
pointer only (licence: NOASSERTION) · get_code("aa9665d69388677d")
How it ran

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

AttentionBlock Ran
ran on a synthesized input
encoreus/gs-jacobi_for_tarflow/GS_Jacobi_sampling.py
code served (permissive licence) · get_code("6aef5991dfa3ccc8")
How it ran

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

import torch
import numpy as np

# INIT_ARGS for AttentionBlock.__init__(channels, head_channels, expansion=4)
INIT_ARGS = {
    'channels': 8,
    'head_channels': 4,
    'expansion': 4
}

# ARGS for AttentionBlock.forward(x, attn_mask=None, attn_temp=1.0, which_cache='cond')
ARGS = {
    'x': torch.randn(2, 5, 8),  # (batch=2, seq_len=5, channels=8)
    'attn_mask': None,
    'attn_temp': 1.0,
    'which_cache': 'cond'
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
AutoregressiveConv2d Ran
ran on a synthesized input · constructed an object; no result was computed
davidemartinelli/PixelCNN/model.py
pointer only (licence: NONE) · get_code("41a11662f8a6cbb5")
How it ran

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

CausalBlock Ran
ran on a synthesized input · constructed an object; no result was computed
anordertoreclaim/PixelCNN/pixelcnn/model.py
pointer only (licence: NONE) · get_code("a8017d58021d4dc8")
How it ran

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

CroppedConv2d Ran
ran on a synthesized input · constructed an object; no result was computed
anordertoreclaim/PixelCNN/pixelcnn/model.py
pointer only (licence: NONE) · get_code("593a9e5f68282f1d")
How it ran

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

DiagonalPixelLSTM Ran
ran on a synthesized input
ardapekis/pixel-rnn/model/pixel_lstm/pixel_lstm.py
code served (permissive licence) · get_code("adeb3b3f5a65c9a0")
How it ran

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

import torch
import torch.nn as nn
from torch import sigmoid, tanh

def skew(tensor):
    output = tensor.new_zeros((tensor.shape[0], tensor.shape[1], tensor.shape[2], tensor.shape[2] + tensor.shape[3] - 1))
    for row in range(tensor.shape[2]):
        columns = (row, row + tensor.shape[3])
        output[:, :, row, columns[0]:columns[1]] = tensor[:, :, row]
    return output

def unskew(tensor):
    output = tensor.new_zeros((tensor.shape[0], tensor.shape[1], tensor.shape[2], tensor.shape[3] - tensor.shape[2] + 1))
    for row in range(tensor.shape[2]):
        columns = (row, row + output.shape[3])
        output[:, :, row] = tensor[:, :, row, columns[0]:columns[1]]
    return output

class DiagonalPixelLSTM(nn.Module):

    def __init__(self, channels_in, hidden_size):
        super(DiagonalPixelLSTM, self).__init__()
        self.channels_in = channels_in
        self.hidden_size = hidden_size
        self.conv_is = nn.Conv2d(channels_in, 5 * hidden_size, [1, 1])
        self.conv_ss = nn.Conv1d(hidden_size, 5 * hidden_size, [2], padding=1)
        print('Created DiagonalPixelLSTM with parameters: {}'.format({'channels_in': self.channels_in, 'hidden_size': self.hidden_size}))

    def forward(self, features):
        input_map = skew(features)
        transformed_is = self.conv_is(input_map)
        hStates = []
        cStates = []
        previous_hidden_column = input_map.new_zeros([input_map.shape[0], self.hidden_size, input_map.shape[2]])
        previous_cell_column = input_map.new_zeros([input_map.shape[0], self.hidden_size, input_map.shape[2]])
        for i in range(input_map.shape[3]):
            input_column = input_map[..., i]
            transformed_ss = self.conv_ss(previous_hidden_column)[..., :-1]
            gates = transformed_is[..., i] + transformed_ss
            output_gate, forget_gate_left, forget_gate_up, input_gate, candidate_gate = torch.chunk(gates, 5, dim=1)
            output_gate, forget_gate_left, forget_gate_up, input_gate = (sigmoid(output_gate), sigmoid(forget_gate_left), sigmoid(forget_gate_up), sigmoid(input_gate))
            candidate_gate = tanh(candidate_gate)
            previous_cell_column_shifted = torch.cat([input_column.new_zeros([input_column.shape[0], self.hidden_size, 1]), previous_cell_column], 2)[..., :-1]
            next_cell_column = forget_gate_left * previous_cell_column + forget_gate_up * previous_cell_column_shifted + input_gate * candidate_gate
            next_hidden_column = output_gate * tanh(next_cell_column)
            hStates.append(next_hidden_column)
            cStates.append(next_cell_column)
            previous_hidden_column = next_hidden_column
            previous_cell_column = next_cell_column
        total_hStates = unskew(torch.stack(hStates, dim=3))
        total_cStates = unskew(torch.stack(cStates, dim=3))
        return total_hStates

INIT_ARGS = {
    'channels_in': 4,
    'hidden_size': 8,
}

ARGS = {
    'features': torch.randn(2, 4, 3, 5),
}

if __name__ == '__main__':
    model = DiagonalPixelLSTM(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output: {output}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
GatedBlock Ran
ran on a synthesized input · constructed an object; no result was computed
anordertoreclaim/PixelCNN/pixelcnn/model.py
pointer only (licence: NONE) · get_code("f64383cb16b99391")
How it ran

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

GatedResidualLayer Ran
ran on a synthesized input
kamenbliznashki/pixel_models/pixelcnn.py
pointer only (licence: NONE) · get_code("67b63a90ba65215a")
How it ran

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

MaskedCNN Ran
ran on a synthesized input · constructed an object; no result was computed
singh-hrituraj/PixelCNN-Pytorch/Model.py
pointer only (licence: GPL-3.0) · get_code("9eee86fe94d2086a")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, singh-hrituraj/PixelCNN-Pytorch, 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.

MaskedConv2D Ran
ran on a synthesized input
sarus-tech/tf2-published-models/gated_pixelcnn/model.py
code served (permissive licence) · get_code("fd12e6cc443d7970")
How it ran

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

import tensorflow as tf
import numpy as np

tfk = tf.keras
tfkl = tf.keras.layers

class MaskedConv2D(tfkl.Layer):

    def __init__(self, stack, n_colors, filters, kernel_size, strides=1, padding='SAME', type=None, name='masked_conv'):
        super(MaskedConv2D, self).__init__(name=name)
        if type not in {'A', 'B', None}:
            raise ValueError(f'MaskedConv2D type should be in (A, B, None), got {type}')
        if stack not in {'H', 'V'}:
            raise ValueError(f'MaskedConv2D stack should be in (V, H), got {stack}')
        self.type = type
        self.stack = stack
        self.n_colors = n_colors
        self.filters = filters
        self.kernel_size = kernel_size
        self.strides = strides
        self.padding = padding

    def build(self, input_shape):
        _, _, _, in_ch = input_shape
        out_ch = self.filters
        if isinstance(self.kernel_size, tuple):
            k_y, k_x = self.kernel_size
        else:
            k_y = self.kernel_size
            k_x = self.kernel_size
        initializer = tfk.initializers.GlorotUniform()
        self.kernel = tf.Variable(initializer((k_y, k_x, in_ch, out_ch), dtype=tf.float32), trainable=True, aggregation=tf.VariableAggregation.MEAN, name='kernel')
        self.bias = tf.Variable(initializer((1, 1, 1, out_ch), dtype=tf.float32), trainable=True, aggregation=tf.VariableAggregation.MEAN, name='bias')
        mid_x, mid_y = (k_x // 2, k_y // 2)
        if self.stack == 'V':
            pixels_per_row_A = [k_x] * mid_y + [0] * (k_y - mid_y)
            pixels_per_row_B = [k_x] * (mid_y + 1) + [0] * (k_y - mid_y - 1)
        else:
            pixels_per_row_A = [0] * mid_y + [mid_x] + [0] * (k_y - mid_y - 1)
            pixels_per_row_B = [0] * mid_y + [mid_x + 1] + [0] * (k_y - mid_y - 1)
        pixels_per_row_A = tf.expand_dims(pixels_per_row_A, axis=1)
        pixels_per_row_B = tf.expand_dims(pixels_per_row_B, axis=1)
        lines = tf.expand_dims(tf.range(k_x), axis=0)
        mask_A = tf.less(lines, pixels_per_row_A)
        mask_B = tf.less(lines, pixels_per_row_B)
        in_ch_per_color = in_ch // self.n_colors
        out_ch_per_color = out_ch // self.n_colors
        mask_A = tf.tile(mask_A[:, :, None, None], [1, 1, in_ch_per_color, out_ch_per_color])
        mask_B = tf.tile(mask_B[:, :, None, None], [1, 1, in_ch_per_color, out_ch_per_color])
        mask_0 = tf.zeros_like(mask_A, dtype=tf.bool)
        mask_colors = []
        if self.type == 'B':
            mask_colors = []
            for i in range(self.n_colors):
                masks = [mask_B] * (i + 1) + [mask_0] * (self.n_colors - i - 1)
                mask_colors.append(tf.concat(masks, axis=2))
        else:
            for i in range(self.n_colors):
                masks = [mask_B] * i + [mask_A] + [mask_0] * (self.n_colors - i - 1)
                mask_colors.append(tf.concat(masks, axis=2))
        self.mask = tf.concat(mask_colors, axis=3)
        self.mask = tf.cast(self.mask, tf.float32)

    def call(self, x):
        h = tf.nn.conv2d(input=x, filters=self.kernel * self.mask, strides=self.strides, padding=self.padding)
        return h + self.bias


INIT_ARGS = {
    'stack': 'V',
    'n_colors': 3,
    'filters': 6,
    'kernel_size': 3,
    'strides': 1,
    'padding': 'SAME',
    'type': 'A',
    'name': 'masked_conv'
}

ARGS = {
    'x': tf.constant(np.random.randn(2, 4, 5, 3).astype(np.float32))
}

layer = MaskedConv2D(**INIT_ARGS)
output = layer(**ARGS)
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 4, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
MaskedConv2d Ran
ran on a synthesized input · constructed an object; no result was computed
anordertoreclaim/PixelCNN/pixelcnn/model.py
pointer only (licence: NONE) · get_code("f3742ce708e8768a")
How it ran

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

MaskedConv2d Ran
ran on a synthesized input
kamenbliznashki/pixel_models/pixelcnn.py
pointer only (licence: NONE) · get_code("4b84e15d943e0dd1")
How it ran

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

MetaBlock Ran
ran on a synthesized input · constructed an object; no result was computed
apple/ml-tarflow/transformer_flow.py
pointer only (licence: NOASSERTION) · get_code("4df96ba87d897b77")
How it ran

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

PixelCNN Ran
ran on a synthesized input · constructed an object; no result was computed
singh-hrituraj/PixelCNN-Pytorch/Model.py
pointer only (licence: GPL-3.0) · get_code("a0639ec87bba3e75")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, singh-hrituraj/PixelCNN-Pytorch, 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.

PixelCNN Ran
ran on a synthesized input
kamenbliznashki/pixel_models/pixelcnn.py
pointer only (licence: NONE) · get_code("c3dfea750f64035b")
How it ran

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

pixelcnn_gate Ran
ran, honoured the contract we drafted
this paper's copy was not recorded; identical code first harvested from kamenbliznashki/pixel_models
pointer only; the stored copy get_code serves, from kamenbliznashki/pixel_models, is pointer only (licence: NONE) · get_code("68cdfbf37a172d13")
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.

skew Ran
ran; our contract draft was wrong, not the code
ardapekis/pixel-rnn/model/pixel_lstm/pixel_lstm.py
code served (permissive licence) · get_code("1e11b6acedaae400")
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 Tensor, ndim 4, dtype family float, shape (2, 3, 4, 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

torch.manual_seed(0)

# Analyze the function:
# - Takes a tensor parameter
# - Uses tensor.shape[0], tensor.shape[1], tensor.shape[2], tensor.shape[3]
# - Calls tensor.new_zeros() to create output
# - Iterates over tensor.shape[2] rows
# - Indexes tensor[:, :, row] and assigns to output
# This suggests a 4D tensor with shape (batch, channels, height, width)

# Create a small 4D tensor
# Using distinct sizes: batch=2, channels=3, height=4, width=5
tensor = torch.randn(2, 3, 4, 5)

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

import torch

torch.manual_seed(0)

# Analyze the function:
# - Takes a tensor with shape (batch, channels, height, width)
# - Creates output with shape (batch, channels, height, width - height + 1)
# - Iterates over rows and extracts diagonal elements
# - Uses tensor.new_zeros() to create output tensor
# - Accesses tensor[:, :, row, columns[0]:columns[1]]

# Create a small test tensor
# Shape: (batch=2, channels=3, height=4, width=5)
# This gives output shape: (2, 3, 4, 5-4+1) = (2, 3, 4, 2)
tensor = torch.randn(2, 3, 4, 5)

ARGS = {
    "tensor": tensor
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 3, 4, 2) — shape (2, 3, 4, 2) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
Attention Not yet run
unverified (harvested, no recorded run)
apple/ml-tarflow/transformer_flow.py
pointer only (licence: NOASSERTION) · get_code("7eca12f0033fe394")
How it ran

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

GatedPixelCNN Not yet run
unverified (harvested, no recorded run)
sarus-tech/tf2-published-models/gated_pixelcnn/model.py
code served (permissive licence) · get_code("641b0eb982592cc1")
How it ran

no invocation recorded.

MetaBlock Not yet run
unverified (harvested, no recorded run)
encoreus/gs-jacobi_for_tarflow/GS_Jacobi_sampling.py
code served (permissive licence) · get_code("7fc2dc61763b0f75")
How it ran

no invocation recorded.

Model Not yet run
unverified (harvested, no recorded run)
apple/ml-tarflow/transformer_flow.py
pointer only (licence: NOASSERTION) · get_code("55440bb0facb712e")
How it ran

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

Model Not yet run
unverified (harvested, no recorded run)
encoreus/gs-jacobi_for_tarflow/GS_Jacobi_sampling.py
code served (permissive licence) · get_code("d605fe24beaa94bc")
How it ran

no invocation recorded.

Network Not yet run
unverified (harvested, no recorded run)
vocong25/gated_pixelcnn/network.py
code served (permissive licence) · get_code("89a37aa23360cbd5")
How it ran

no invocation recorded.

PixelCNN Not yet run
unverified (harvested, no recorded run)
davidemartinelli/PixelCNN/model.py
pointer only (licence: NONE) · get_code("faf32f2d8a81d283")
How it ran

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

PixelCNN Not yet run
unverified (harvested, no recorded run)
anordertoreclaim/PixelCNN/pixelcnn/model.py
pointer only (licence: NONE) · get_code("54596247934223eb")
How it ran

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

ResidualBlock Not yet run
unverified (harvested, no recorded run)
sarus-tech/tf2-published-models/gated_pixelcnn/model.py
code served (permissive licence) · get_code("3dfb65c9576dbca8")
How it ran

no invocation recorded.

get_gpu_memory_map Not yet run
unverified (harvested, no recorded run)
davidemartinelli/PixelCNN/model.py
pointer only (licence: NONE) · get_code("347b676bc02e2b59")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, davidemartinelli/PixelCNN 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 29 samples lifted from this paper's linked repositories, 29 carry a function identity and 0 do not. Of the 28 distinct functions with an identity, 2 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 26 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

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

FunctionAlso present inEarliest-datedOthers named
get_gpu_memory_map
brick of this paper's assembly: helper
1 other paper
1 dated earlier
1312.6114 (2013-12)
Auto-Encoding Variational Bayes
pixelcnn_gate
brick of this paper's assembly: helper
1 other paper
1 later
1606.05328 (2016-06)
Conditional Image Generation with PixelCNN Decoders

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

Modeling the distribution of natural images is a landmark problem in unsupervised learning. This task requires an image model that is at once expressive, tractable and scalable. We present a deep neural network that sequentially predicts the pixels in an image along the two spatial dimensions. Our method models the discrete probability of the raw pixel values and encodes the complete set of dependencies in the image. Architectural novelties include fast twodimensional recurrent layers and an effective use of residual connections in deep recurrent networks. We achieve log-likelihood scores on natural images that are considerably better than the previous state of the art. Our main results also provide benchmarks on the diverse ImageNet dataset. Samples generated from the model appear crisp, varied and globally coherent.

For agents

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

get_harvested_code_for_paper("1601.06759")
get_code_for_paper("1601.06759")
have("1601.06759")

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

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

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

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

Connect an agent — have() is free.