SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1803.07416 · 2018

Tensor2Tensor for Neural Machine Translation

arXiv · PDF · Open in the Atlas

Code that ran

30 of 48 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 29 have no contract verdict; 1 failure of our instrument; 18 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1803.07416.json · badge: /api/ran/1803.07416.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
tensorflow/tensor2tensor canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
Eamin-sust/tensor2tensor community (classifier label)
classifier basis not recorded on the link
8 ran · 3 no recorded run
1iyc/T2T-Analysis community (classifier label)
classifier basis not recorded on the link
7 ran · 1 no recorded run
Erra-Ernesto/master community (classifier label)
classifier basis not recorded on the link
4 ran · 5 no recorded run
Janice-M/tensorflow-lessons community (classifier label)
classifier basis not recorded on the link
3 ran · 2 no recorded run
qijimrc/tensor2tensor community (classifier label)
classifier basis not recorded on the link
2 ran · 1 no recorded run
Pek20180909/dp-transformer community (classifier label)
classifier basis not recorded on the link
2 ran · 0 no recorded run
JiachenMao/TransfornerPrune community (classifier label)
classifier basis not recorded on the link
1 ran · 4 no recorded run
tianhai123/- community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
hhy37/tensor2tensor community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
samsucik/t2t community (classifier label)
classifier basis not recorded on the link
0 ran · 1 no recorded run
gitboyzorro5/tensor2tensor community (classifier label)
classifier basis not recorded on the link
0 ran · 1 no recorded run
FunctionStatusWhere it lives
add_delta_deltas Ran
ran on a synthesized input
Eamin-sust/tensor2tensor/tensor2tensor/layers/common_audio.py
code served (permissive licence) · get_code("748914abdfd6b822")
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 numpy as np
import scipy.signal
import tensorflow.compat.v1 as tf

tf.disable_v2_behavior()

# Create a small filterbanks tensor
# Shape: [batch_size, len, num_bins, 1]
batch_size = 2
len_time = 4
num_bins = 3
filterbanks = tf.constant(
    np.random.randn(batch_size, len_time, num_bins, 1).astype(np.float32)
)

ARGS = {
    "filterbanks": filterbanks,
    "name": None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, 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
add_delta_deltas Ran
ran on a synthesized input
Erra-Ernesto/master/tensor2tensor/layers/common_audio.py
code served (permissive licence) · get_code("afcb74fd5f657185")
How it ran

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

# Create a small filterbanks tensor with shape [batch_size, len, num_bins, 1]
# Using batch_size=2, len=4, num_bins=3, channels=1
batch_size = 2
len_time = 4
num_bins = 3
channels = 1

filterbanks = tf.random.normal(
    shape=[batch_size, len_time, num_bins, channels],
    dtype=tf.float32
)

ARGS = {
    "filterbanks": filterbanks,
    "name": None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 4, dtype family float, shape (2, 4, 3, 3) — shape (2, 4, 3, 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
add_evolved_transformer_hparams Ran
ran on a synthesized input
Pek20180909/dp-transformer/tensor2tensor/models/evolved_transformer.py
code served (permissive licence) · get_code("a39a84994bf39310")
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 HParams. 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

class HParams:
    """Simple hparams container class."""
    def __init__(self):
        self.num_encoder_layers = 2
        self.num_decoder_layers = 3
        self.learning_rate_constant = 1.0
        self.learning_rate_warmup_steps = 10000
        self.learning_rate_schedule = 'constant'
        self.learning_rate_decay_steps = 100000

torch.manual_seed(0)

hparams = HParams()

ARGS = {
    'hparams': hparams
}
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 HParams — a HParams output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a HParams 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
add_standard_attention_hparams Ran
ran on a synthesized input
Erra-Ernesto/master/tensor2tensor/layers/common_attention.py
code served (permissive licence) · get_code("74d5ffaeacd67288")
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 MockHParams. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)


class MockHParams:
    """A mock hyperparameter object that mimics tf.contrib.training.HParams"""
    def __init__(self):
        self.params = {}
    
    def add_hparam(self, key, value):
        self.params[key] = value
        return self
    
    def __getattr__(self, name):
        if name == 'params':
            return super().__getattribute__(name)
        if name in self.params:
            return self.params[name]
        raise AttributeError(f"No hparam named {name}")
    
    def __setattr__(self, name, value):
        if name == 'params':
            super().__setattr__(name, value)
        else:
            if not hasattr(self, 'params'):
                super().__setattr__('params', {})
            self.params[name] = value


hparams = MockHParams()

ARGS = {
    'hparams': hparams
}
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 MockHParams — a MockHParams output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MockHParams 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
average_sharded_losses Ran
ran on a synthesized input
1iyc/T2T-Analysis/tensor2tensor/utils/t2t_model.py
code served (permissive licence) · get_code("e0f4770f7b603395")
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 dict. 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

# Create test data for sharded_losses
# The function expects a list of dicts, where each dict maps loss names to either:
# - a single Tensor, or
# - a tuple of (numerator_tensor, denominator_tensor)

# Create first shard with mixed loss types
shard1 = {
    "loss_a": tf.constant([1.0, 2.0, 3.0, 4.0]),
    "loss_b": (tf.constant([10.0, 20.0]), tf.constant([2.0, 4.0])),
}

# Create second shard with the same loss names
shard2 = {
    "loss_a": tf.constant([2.0, 3.0, 4.0, 5.0]),
    "loss_b": (tf.constant([15.0, 25.0]), tf.constant([3.0, 5.0])),
}

# Create third shard
shard3 = {
    "loss_a": tf.constant([3.0, 4.0, 5.0, 6.0]),
    "loss_b": (tf.constant([12.0, 22.0]), tf.constant([2.0, 4.0])),
}

sharded_losses = [shard1, shard2, shard3]

ARGS = {
    "sharded_losses": sharded_losses,
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
comma_separated_string_to_integer_list Ran
ran on a synthesized input
Erra-Ernesto/master/tensor2tensor/layers/common_layers.py
code served (permissive licence) · get_code("f5e828468ccc9543")
How it ran

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

import torch

ARGS = {
    '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
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family int — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
compute_mel_filterbank_features Ran
ran on a synthesized input
Eamin-sust/tensor2tensor/tensor2tensor/layers/common_audio.py
code served (permissive licence) · get_code("0cd8646d2fafc11f")
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 functools
import numpy as np
import tensorflow.compat.v1 as tf

tf.disable_v2_behavior()

# Create a small waveform tensor
# Shape: [batch_size=2, max_len=4]
waveforms = tf.constant([
    [0.1, 0.2, 0.15, 0.05],
    [0.3, 0.25, 0.1, 0.0]
], dtype=tf.float32)

ARGS = {
    'waveforms': waveforms,
    'sample_rate': 16000,
    'dither': 1.0 / np.iinfo(np.int16).max,
    'preemphasis': 0.97,
    'frame_length': 25,
    'frame_step': 10,
    'fft_length': None,
    'window_fn': functools.partial(tf.signal.hann_window, periodic=True),
    'lower_edge_hertz': 80.0,
    'upper_edge_hertz': 7600.0,
    'num_mel_bins': 80,
    'log_noise_floor': 0.001,
    'apply_mask': True,
}
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
create_regularization_loss_fn Ran
ran on a synthesized input
Erra-Ernesto/master/tensor2tensor/layers/bayes.py
code served (permissive licence) · get_code("9f7a9aa79bcd909d")
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

# Define a simple variable function that returns a TensorFlow Variable
def variable_fn():
    """Returns a TensorFlow Variable."""
    return tf.Variable(np.random.randn(4, 3).astype(np.float32))

# Define a simple regularizer function that computes L2 regularization
def regularizer_fn(variable):
    """Returns a regularization loss tensor (L2 norm)."""
    return tf.reduce_sum(tf.square(variable))

# Construct the ARGS dictionary
ARGS = {
    "name": "test_regularizer",
    "variable_fn": variable_fn,
    "regularizer_fn": regularizer_fn,
}
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
deserialize Ran
ran on a synthesized input
JiachenMao/TransfornerPrune/tensor2tensor/layers/bayes.py
code served (permissive licence) · get_code("8e8132bfb8eb0cd2")
How it ran

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

import tensorflow as tf

# The deserialize function expects a config dict that represents a Keras object
# to be deserialized. We'll create a minimal valid config for a simple Keras layer.

config = {
    'class_name': 'Dense',
    'config': {
        'name': 'dense_layer',
        'dtype': 'float32',
        'trainable': True,
        'units': 10,
        'activation': 'relu',
        'use_bias': True,
        'kernel_initializer': {
            'class_name': 'GlorotUniform',
            'config': {'seed': None}
        },
        'bias_initializer': {
            'class_name': 'Zeros',
            'config': {}
        },
        'kernel_regularizer': None,
        'bias_regularizer': None,
        'activity_regularizer': None,
        'kernel_constraint': None,
        'bias_constraint': None
    }
}

custom_objects_dict = None

ARGS = {
    'config': config,
    'custom_objects': custom_objects_dict
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
distorted_bounding_box_crop Ran
ran on a synthesized input
Eamin-sust/tensor2tensor/tensor2tensor/data_generators/imagenet.py
code served (permissive licence) · get_code("c3b99eca8b1dea7b")
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 tensorflow.compat.v1 as tf
import numpy as np

tf.disable_v2_behavior()

# Create a small image tensor (height=4, width=3, channels=3)
image = tf.constant(np.random.randint(0, 256, (4, 3, 3), dtype=np.uint8), dtype=tf.uint8)

# Create bounding boxes tensor with shape [1, num_boxes, 4]
# Each box is [ymin, xmin, ymax, xmax] in [0, 1) range
# Using 2 boxes for this example
bbox = tf.constant([[[0.1, 0.2, 0.5, 0.7], [0.3, 0.3, 0.8, 0.9]]], dtype=tf.float32)

ARGS = {
    'image': image,
    'bbox': bbox,
    'min_object_covered': 0.1,
    'aspect_ratio_range': (0.75, 1.33),
    'area_range': (0.05, 1.0),
    'max_attempts': 100,
    'scope': None
}
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 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
dropout_with_broadcast_dims Ran
ran on a synthesized input
qijimrc/tensor2tensor/tensor2tensor/layers/common_layers.py
code served (permissive licence) · get_code("6faf23aab5900dc8")
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 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 tensorflow as tf
import numpy as np

# Create a small floating point tensor
x = tf.constant(np.random.randn(2, 4, 3), dtype=tf.float32)

# Create a keep probability scalar
keep_prob = tf.constant(0.8, dtype=tf.float32)

# Create broadcast_dims list
broadcast_dims = [0, 2]

# Define ARGS dict with all parameters
ARGS = {
    'x': x,
    'keep_prob': keep_prob,
    'broadcast_dims': broadcast_dims,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, six, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, 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
is_in_expr Ran
ran on a synthesized input
1iyc/T2T-Analysis/tensor2tensor/data_generators/algorithmic_math.py
code served (permissive licence) · get_code("7e2bc85a4d4189a9")
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.

class Operator:
    def __init__(self, symbol, precedence, associative=False):
        self.symbol = symbol
        self.precedence = precedence
        self.associative = associative
    
    def __str__(self):
        return self.symbol
    
    def __eq__(self, other):
        if not isinstance(other, Operator):
            return False
        return self.symbol == other.symbol


class ExprNode(object):
    """A node in an expression tree.

    ExprNode always holds an operator. Leaves are strings.
    """

    def __init__(self, left, right, op):
        self.left = left
        self.right = right
        self.op = op
        left_depth = left.depth if isinstance(left, ExprNode) else 0
        right_depth = right.depth if isinstance(right, ExprNode) else 0
        self.depth = max(left_depth, right_depth) + 1

    def __str__(self):
        left_str = str(self.left)
        right_str = str(self.right)
        left_use_parens = isinstance(self.left, ExprNode) and self.left.op.precedence < self.op.precedence
        right_use_parens = isinstance(self.right, ExprNode) and self.right.op.precedence <= self.op.precedence and (not (self.op.associative and self.right.op == self.op))
        left_final = '(' + left_str + ')' if left_use_parens else left_str
        right_final = '(' + right_str + ')' if right_use_parens else right_str
        return left_final + str(self.op) + right_final

    def is_in(self, expr):
        """Returns True if `expr` is a subtree."""
        if expr == self:
            return True
        is_in_left = is_in_expr(self.left, expr)
        is_in_right = is_in_expr(self.right, expr)
        return is_in_left or is_in_right


def is_in_expr(expr, find):
    """Returns True if `find` is a subtree of `expr`."""
    return expr == find or (isinstance(expr, ExprNode) and expr.is_in(find))


# Create operators
plus_op = Operator("+", precedence=1, associative=True)
mult_op = Operator("*", precedence=2, associative=True)

# Create leaf nodes (strings)
leaf_a = "a"
leaf_b = "b"
leaf_c = "c"

# Create expression nodes
# expr1: (a + b)
expr1 = ExprNode(leaf_a, leaf_b, plus_op)

# expr2: ((a + b) * c)
expr2 = ExprNode(expr1, leaf_c, mult_op)

# expr3: (b * c) - a different subtree
expr3 = ExprNode(leaf_b, leaf_c, mult_op)

# expr4: just a leaf
expr4 = "d"

ARGS = {
    "expr": expr2,
    "find": expr1
}
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
large_compatible_negative Ran
ran on a synthesized input
Eamin-sust/tensor2tensor/tensor2tensor/layers/common_attention.py
code served (permissive licence) · get_code("4dce1b2c80bc7259")
How it ran

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

import tensorflow.compat.v1 as tf

# The function takes a tensor_type parameter and checks if it equals tf.float16
# or returns a large negative number. We need to pass a valid TensorFlow dtype.

ARGS = {
    "tensor_type": tf.float32
}
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 float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
large_compatible_negative Ran
ran on a synthesized input
Janice-M/tensorflow-lessons/tensor2tensor/layers/common_attention.py
code served (permissive licence) · get_code("9a3f3b5c8fe9f016")
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 float16, 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

# Test with tf.float16 type
ARGS = {
    "tensor_type": tf.float16
}
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 float16, 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
lower_endian_to_number Ran
ran on a synthesized input
1iyc/T2T-Analysis/tensor2tensor/data_generators/algorithmic.py
code served (permissive licence) · get_code("b1896a2536602d28")
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
import numpy as np

torch.manual_seed(0)

# Analyzing the function:
# - l: a list of digits (iterates over it with enumerate)
# - base: used in exponentiation (base ** i)
# The function converts a lower-endian representation to a number

# Example: l = [1, 2, 3] with base 10
# Result: 1*10^0 + 2*10^1 + 3*10^2 = 1 + 20 + 300 = 321

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

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

import tensorflow.compat.v1 as tf

# Create a simple hparams class with activation_dtype and weight_dtype attributes
class HParams:
    def __init__(self, activation_dtype, weight_dtype):
        self.activation_dtype = activation_dtype
        self.weight_dtype = weight_dtype

# Create a small logits tensor (batch_size=2, logits_dim=4)
logits = tf.constant([[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]], dtype=tf.float16)

# Create hparams with mixed precision enabled (activation_dtype=float16, weight_dtype=float32)
hparams = HParams(activation_dtype=tf.float16, weight_dtype=tf.float32)

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

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

class HParams:
    def __init__(self, activation_dtype, weight_dtype):
        self.activation_dtype = activation_dtype
        self.weight_dtype = weight_dtype

logits_tensor = tf.constant([[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]], dtype=tf.float16)

ARGS = {
    'logits': logits_tensor,
    'activation_dtype': tf.float16,
    'weight_dtype': tf.float32,
    'hparams': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 2, dtype family float — no output shape is stated: observe_signature.py recorded SymbolicTensor ndim 2, which disagrees with the fixture run
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
mixed_precision_is_enabled Ran
ran on a synthesized input
Eamin-sust/tensor2tensor/tensor2tensor/layers/common_attention.py
code served (permissive licence) · get_code("db9de8c21cfb33b2")
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 tensorflow.compat.v1 as tf

class HParams:
    def __init__(self, activation_dtype, weight_dtype):
        self.activation_dtype = activation_dtype
        self.weight_dtype = weight_dtype

# Case 1: Using hparams with mixed precision enabled
hparams_mixed = HParams(
    activation_dtype=tf.float16,
    weight_dtype=tf.float32
)

# Case 2: Using individual parameters
activation_dtype_value = tf.float16
weight_dtype_value = tf.float32

ARGS = {
    'activation_dtype': activation_dtype_value,
    'weight_dtype': weight_dtype_value,
    'hparams': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
mixed_precision_is_enabled Ran
ran on a synthesized input
Janice-M/tensorflow-lessons/tensor2tensor/layers/common_attention.py
code served (permissive licence) · get_code("a26680f8cb87d722")
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 tensorflow as tf

class HParams:
    def __init__(self, activation_dtype, weight_dtype):
        self.activation_dtype = activation_dtype
        self.weight_dtype = weight_dtype

ARGS = {
    'activation_dtype': tf.float16,
    'weight_dtype': tf.float32,
    'hparams': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
problem_hparams_to_features Ran
ran; our contract draft was wrong, not the code
tensorflow/tensor2tensor/tensor2tensor/data_generators/problem.py
code served (permissive licence) · get_code("4116527c2a478716")
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 dict. 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.

class ProblemHParams:
    def __init__(self, input_space_id, target_space_id):
        self.input_space_id = input_space_id
        self.target_space_id = target_space_id

problem_hparams_obj = ProblemHParams(input_space_id=5, target_space_id=7)

ARGS = {
    'problem_hparams': problem_hparams_obj
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
random_expr Ran
ran on a synthesized input
1iyc/T2T-Analysis/tensor2tensor/data_generators/algorithmic_math.py
code served (permissive licence) · get_code("916cc023d1d1ddbd")
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 ExprNode. 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 random

class ExprOp(object):
    """A stand-in operator class for expression trees."""
    def __init__(self, symbol, precedence, associative=False):
        self.symbol = symbol
        self.precedence = precedence
        self.associative = associative
    
    def __str__(self):
        return self.symbol
    
    def __eq__(self, other):
        return isinstance(other, ExprOp) and self.symbol == other.symbol


# Set seed for reproducibility
random.seed(42)

# Create operator instances with different precedence levels
op_add = ExprOp('+', precedence=1, associative=True)
op_mult = ExprOp('*', precedence=2, associative=True)
op_sub = ExprOp('-', precedence=1, associative=False)

ops = [op_add, op_mult, op_sub]

# Variable list - simple single character strings
vlist = ['x', 'y', 'z', 'a', 'b']

# Depth for the expression tree
depth = 3

ARGS = {
    'depth': depth,
    'vlist': vlist,
    'ops': ops,
}
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 ExprNode — a ExprNode output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ExprNode 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
random_expr_with_required_var Ran
ran on a synthesized input
1iyc/T2T-Analysis/tensor2tensor/data_generators/algorithmic_math.py
code served (permissive licence) · get_code("0a76872f8ddc4b1e")
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 ExprNode. 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 random

class ExprOp(object):
    """A simple operator class for expressions."""
    def __init__(self, symbol, precedence, associative=False):
        self.symbol = symbol
        self.precedence = precedence
        self.associative = associative
    
    def __str__(self):
        return self.symbol
    
    def __eq__(self, other):
        if not isinstance(other, ExprOp):
            return False
        return self.symbol == other.symbol

# Set seed for reproducibility
random.seed(42)

# Define some operators with precedence and associativity
op_add = ExprOp('+', precedence=1, associative=True)
op_mult = ExprOp('*', precedence=2, associative=True)
op_sub = ExprOp('-', precedence=1, associative=False)

ops = [op_add, op_mult, op_sub]

# Define parameters
depth = 3
required_var = 'x'
optional_list = ['a', 'b', 'c']

ARGS = {
    'depth': depth,
    'required_var': required_var,
    'optional_list': optional_list,
    'ops': ops
}
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 ExprNode — a ExprNode output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ExprNode 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
scores_filter Ran
ran on a synthesized input
Eamin-sust/tensor2tensor/tensor2tensor/insights/transformer_model.py
code served (permissive licence) · get_code("71927fc77962a843")
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

# Create a minimal stand-in class for the datum object
class MockDatum:
    def __init__(self, node_name):
        self.node_name = node_name

# Create valid test cases
datum = MockDatum(node_name='operation_topk_scores_layer')
tensor = torch.randn(2, 4)

ARGS = {
    'datum': datum,
    'tensor': tensor
}
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
seq_filter Ran
ran on a synthesized input
Eamin-sust/tensor2tensor/tensor2tensor/insights/transformer_model.py
code served (permissive licence) · get_code("6f29b141db6bc7e8")
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

class MockDatum:
    def __init__(self, node_name):
        self.node_name = node_name

# Create a datum object that contains 'topk_seq' in the node_name
datum = MockDatum("operation_topk_seq_layer")

# tensor parameter is unused according to the docstring
tensor = torch.tensor([1.0, 2.0, 3.0, 4.0])

ARGS = {
    "datum": datum,
    "tensor": 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 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
shift_and_pad Ran
ran on a synthesized input
Pek20180909/dp-transformer/tensor2tensor/models/research/transformer_aux.py
code served (permissive licence) · get_code("59c61142257c9e1e")
How it ran

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

# Create a simple TensorFlow tensor for testing
# Using shape (4, 3) to have distinct dimensions
tensor_value = tf.constant([[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]], dtype=tf.int32)

# Set up arguments for shift_and_pad function
ARGS = {
    "tensor": tensor_value,
    "shift": 2,
    "axis": 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 2, dtype family int, shape (4, 3) — shape (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
slice_hidden Ran
ran on a synthesized input
qijimrc/tensor2tensor/tensor2tensor/layers/discretization.py
code served (permissive licence) · get_code("07193e79db3b92e4")
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 3, dtype family float, shape (2, 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 tensorflow as tf
import numpy as np

# Set seed for reproducibility
tf.random.set_seed(0)

# Create a small encoder hidden state tensor
# Shape: [-1, hidden_size] where batch_size=2, hidden_size=8
batch_size = 2
hidden_size = 8
x = tf.constant(np.random.randn(batch_size, hidden_size).astype(np.float32))

# Number of blocks
num_blocks = 4

ARGS = {
    "x": x,
    "hidden_size": hidden_size,
    "num_blocks": num_blocks,
}
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 3, dtype family float, shape (2, 4, 2) — shape (2, 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
smart_constant_value Ran
ran on a synthesized input
tianhai123/-/tensor2tensor/layers/bayes.py
code served (permissive licence) · get_code("4f3643595cc37d38")
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 tensorflow as tf

# Test case 1: Python bool
pred_bool = True
ARGS = {"pred": pred_bool}
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 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
swap_time_and_batch_axes Ran
ran on a synthesized input
hhy37/tensor2tensor/tensor2tensor/layers/common_video.py
code served (permissive licence) · get_code("592f83812bb35157")
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 3, dtype family float, shape (3, 2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tensorflow as tf
import numpy as np

# Create a small test input tensor with shape (batch_size, time_steps, features)
# Using distinct sizes: batch=2, time=3, features=4
inputs = tf.constant(np.random.randn(2, 3, 4).astype(np.float32))

ARGS = {
    "inputs": inputs
}
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 3, dtype family float, shape (3, 2, 4) — shape (3, 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
zipf_distribution Ran
ran on a synthesized input
1iyc/T2T-Analysis/tensor2tensor/data_generators/algorithmic.py
code served (permissive licence) · get_code("68fe9a15fc61f6bd")
How it ran

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

import numpy as np

# The function takes two parameters:
# 1. nbr_symbols: an integer representing the number of symbols
# 2. alpha: a float representing the Zipf distribution parameter

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

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

np.random.seed(42)

# Create a valid Zipf distribution (cumulative distribution function)
# This should be a sorted array of cumulative probabilities from 0 to 1
nbr_symbols = 10
zipf_probs = np.array([1.0 / (i + 1) for i in range(nbr_symbols)])
zipf_probs = zipf_probs / zipf_probs.sum()  # normalize
distr_map = np.cumsum(zipf_probs)  # convert to CDF for searchsorted

sample_len = 7

ARGS = {
    "distr_map": distr_map,
    "sample_len": sample_len,
}
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 list, ndim 1, dtype family int — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
add_weight Not yet run
unverified (harvested, no recorded run)
JiachenMao/TransfornerPrune/tensor2tensor/layers/bayes.py
code served (permissive licence) · get_code("b9294972d34bac80")
How it ran

no invocation recorded.

convert_gradient_to_tensor Not yet run
unverified (harvested, no recorded run)
Erra-Ernesto/master/tensor2tensor/layers/common_layers.py
code served (permissive licence) · get_code("5ea4d4b72662bfaf")
How it ran

no invocation recorded.

create_host_call Not yet run
unverified (harvested, no recorded run)
samsucik/t2t/tensor2tensor/utils/t2t_model.py
code served (permissive licence) · get_code("adbdf489f02bb809")
How it ran

no invocation recorded.

distorted_bounding_box_crop Not yet run
unverified (harvested, no recorded run)
Erra-Ernesto/master/tensor2tensor/data_generators/imagenet.py
code served (permissive licence) · get_code("50ee75354b0c6168")
How it ran

no invocation recorded.

dropout_with_broadcast_dims Not yet run
unverified (harvested, no recorded run)
Erra-Ernesto/master/tensor2tensor/layers/common_layers.py
code served (permissive licence) · get_code("0e0b6e97db301154")
How it ran

no invocation recorded.

encoder_decoder_attention_loss Not yet run
unverified (harvested, no recorded run)
gitboyzorro5/tensor2tensor/tensor2tensor/layers/common_attention.py
code served (permissive licence) · get_code("6b159f110a2bd644")
How it ran

no invocation recorded.

get Not yet run
unverified (harvested, no recorded run)
JiachenMao/TransfornerPrune/tensor2tensor/layers/bayes.py
code served (permissive licence) · get_code("30733be1f346d1da")
How it ran

no invocation recorded.

imagenet_preprocess_example Not yet run
unverified (harvested, no recorded run)
Eamin-sust/tensor2tensor/tensor2tensor/data_generators/imagenet.py
code served (permissive licence) · get_code("1beeedf33db29766")
How it ran

no invocation recorded.

imagenet_preprocess_example Not yet run
unverified (harvested, no recorded run)
Erra-Ernesto/master/tensor2tensor/data_generators/imagenet.py
code served (permissive licence) · get_code("5393a76ac31b9d6f")
How it ran

no invocation recorded.

imagenet_preprocess_example Not yet run
unverified (harvested, no recorded run)
Janice-M/tensorflow-lessons/tensor2tensor/data_generators/imagenet.py
code served (permissive licence) · get_code("80cb2afad98acef4")
How it ran

no invocation recorded.

imagenet_preprocess_example Not yet run
unverified (harvested, no recorded run)
JiachenMao/TransfornerPrune/tensor2tensor/data_generators/imagenet.py
code served (permissive licence) · get_code("512b3e2718d80431")
How it ran

no invocation recorded.

prepare_data Not yet run
unverified (harvested, no recorded run)
1iyc/T2T-Analysis/tensor2tensor/bin/t2t_attack.py
code served (permissive licence) · get_code("2d21f2cb3f076c8e")
How it ran

no invocation recorded.

preprocess_for_train Not yet run
unverified (harvested, no recorded run)
Eamin-sust/tensor2tensor/tensor2tensor/data_generators/imagenet.py
code served (permissive licence) · get_code("d0146eb229788856")
How it ran

no invocation recorded.

preprocess_for_train Not yet run
unverified (harvested, no recorded run)
Erra-Ernesto/master/tensor2tensor/data_generators/imagenet.py
code served (permissive licence) · get_code("c31961a8f08b93ca")
How it ran

no invocation recorded.

preprocess_for_train Not yet run
unverified (harvested, no recorded run)
Janice-M/tensorflow-lessons/tensor2tensor/data_generators/imagenet.py
code served (permissive licence) · get_code("d323135519eb2eaa")
How it ran

no invocation recorded.

preprocess_for_train Not yet run
unverified (harvested, no recorded run)
JiachenMao/TransfornerPrune/tensor2tensor/data_generators/imagenet.py
code served (permissive licence) · get_code("2ab69b6d79c736b0")
How it ran

no invocation recorded.

project_hidden Not yet run
unverified (harvested, no recorded run)
qijimrc/tensor2tensor/tensor2tensor/layers/discretization.py
code served (permissive licence) · get_code("7db79e182d1bda05")
How it ran

no invocation recorded.

topk_watch_fn Not yet run
unverified (harvested, no recorded run)
Eamin-sust/tensor2tensor/tensor2tensor/insights/transformer_model.py
code served (permissive licence) · get_code("7d5116b9da3e71ed")
How it ran

no invocation recorded.

Also present in other papers' code

Of 48 samples lifted from this paper's linked repositories, 48 carry a function identity and 0 do not. Of the 39 distinct functions with an identity, 8 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 7 later) and 31 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
convert_gradient_to_tensor 1 other paper
1 later
1910.07763 (2019-10)
Mixture-of-Experts Variational Autoencoder for Clustering and Generating from Similarity-Based Representations on Single Cell Data
is_in_expr 1 other paper
1 later
1911.08717 (2019-11)
Fine-Tuning by Curriculum Learning for Non-Autoregressive Neural Machine Translation
lower_endian_to_number 1 other paper
1 later
1911.08717 (2019-11)
Fine-Tuning by Curriculum Learning for Non-Autoregressive Neural Machine Translation
problem_hparams_to_features 1 other paper
1 dated earlier
1706.05137 (2017-06)
One Model To Learn Them All
random_expr 1 other paper
1 later
1911.08717 (2019-11)
Fine-Tuning by Curriculum Learning for Non-Autoregressive Neural Machine Translation
random_expr_with_required_var 1 other paper
1 later
1911.08717 (2019-11)
Fine-Tuning by Curriculum Learning for Non-Autoregressive Neural Machine Translation
zipf_distribution 1 other paper
1 later
1911.08717 (2019-11)
Fine-Tuning by Curriculum Learning for Non-Autoregressive Neural Machine Translation
zipf_random_sample 1 other paper
1 later
1911.08717 (2019-11)
Fine-Tuning by Curriculum Learning for Non-Autoregressive Neural Machine Translation

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

Repositories linked to this paper

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

Abstract

Tensor2Tensor is a library for deep learning models that is well-suited for neural machine translation and includes the reference implementation of the state-of-the-art Transformer model.

For agents

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

get_harvested_code_for_paper("1803.07416")
get_code_for_paper("1803.07416")
have("1803.07416")

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

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

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

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

Connect an agent — have() is free.