SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1809.00794 · 2018

Texar: A Modularized, Versatile, and Extensible Toolkit for Text Generation

arXiv · PDF · Open in the Atlas

Code that ran

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

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1809.00794.json · badge: /api/ran/1809.00794.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
asyml/texar-pytorch community (classifier label)
classifier basis not recorded on the link
7 ran · 1 no recorded run
eff-kay/temp-texar-repo community (classifier label)
classifier basis not recorded on the link
4 ran · 0 no recorded run
FunctionStatusWhere it lives
binary_adversarial_losses Ran
ran on a synthesized input
eff-kay/temp-texar-repo/texar/losses/adv_losses.py
code served (permissive licence) · get_code("7be74c990e82bf0c")
How it ran

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

import tensorflow as tf
import numpy as np

# Create a simple discriminator function that returns logits
def simple_discriminator(data):
    """A discriminator that returns logits for real/fake classification."""
    # Just return a scalar logit per sample (batch_size,)
    batch_size = tf.shape(data)[0]
    logits = tf.random.normal([batch_size])
    return logits

# Create real and fake data
real_data = tf.constant(np.random.randn(2, 4).astype(np.float32))
fake_data = tf.constant(np.random.randn(3, 4).astype(np.float32))

ARGS = {
    'real_data': real_data,
    'fake_data': fake_data,
    'discriminator_fn': simple_discriminator,
    'mode': 'max_real'
}
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, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_rnn_cell_trainable_variables Ran
ran on a synthesized input
eff-kay/temp-texar-repo/texar/core/layers.py
code served (permissive licence) · get_code("0473c1f7b7625eef")
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. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

class MockRNNCell(nn.Module):
    """Mock RNN cell with trainable_variables attribute"""
    def __init__(self):
        super().__init__()
        self.weight = nn.Parameter(torch.randn(4, 3))
        self.bias = nn.Parameter(torch.randn(3))
    
    @property
    def trainable_variables(self):
        return [self.weight, self.bias]

class WrappedRNNCell(nn.Module):
    """Wrapped RNN cell that exposes _cell attribute"""
    def __init__(self, cell):
        super().__init__()
        self._cell = cell
    
    def __getattr__(self, name):
        if name == '_cell':
            return object.__getattribute__(self, '_cell')
        try:
            return object.__getattribute__(self, name)
        except AttributeError:
            return getattr(self._cell, name)

# Create a mock RNN cell
mock_cell = MockRNNCell()

# Test the function with direct access to trainable_variables
cell = mock_cell

ARGS = {
    "cell": cell
}
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 — a list 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
hardmax Ran
ran on a synthesized input
asyml/texar-pytorch/texar/torch/core/attention_mechanism_utils.py
code served (permissive licence) · get_code("d5cec307427d9e0e")
How it ran

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

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# Create a small batch of logits
# Shape: (batch_size=2, num_classes=4)
logits = torch.randn(2, 4)

ARGS = {
    "logits": logits
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family int, 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
identity Ran
ran on a synthesized input
asyml/texar-pytorch/texar/torch/core/layers.py
code served (permissive licence) · get_code("9653005aa6ef8e44")
How it ran

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

import torch

torch.manual_seed(0)

# Create a small input tensor with distinct dimensions
inputs = torch.randn(2, 4)

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

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

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# Create small tensors for testing
# Shape: (batch_size=2, num_classes=4)
target_logits = torch.randn(2, 4)
input_logits = torch.randn(2, 4)

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

torch.manual_seed(0)

ARGS = {
    'l': 0.01
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type L1L2 — a L1L2 output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a L1L2 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
l1_l2 Ran
ran on a synthesized input
asyml/texar-pytorch/texar/torch/core/regularizers.py
code served (permissive licence) · get_code("cb53333219376a6d")
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 L1L2. 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

torch.manual_seed(0)

# The l1_l2 function takes two parameters: l1 and l2
# Both are Union[int, float] representing regularization factors
# The function returns an L1L2 regularizer instance

ARGS = {
    'l1': 0.01,
    'l2': 0.01,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type L1L2 — a L1L2 output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a L1L2 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
l2 Ran
ran on a synthesized input
asyml/texar-pytorch/texar/torch/core/regularizers.py
code served (permissive licence) · get_code("504c4f1f2d5dd1ad")
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 L1L2. 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
from typing import Dict, Union

torch.manual_seed(0)

# The l2 function takes a single parameter 'l' which is a Union[int, float]
# representing the L2 regularization factor
# Default value is 0.01

ARGS = {
    'l': 0.01
}
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 L1L2 — a L1L2 output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a L1L2 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
reduce_batch_time Ran
ran on a synthesized input
asyml/texar-pytorch/texar/torch/losses/losses_utils.py
code served (permissive licence) · get_code("cc510f94510c4113")
How it ran

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

import torch

torch.manual_seed(0)

# Create a sequence tensor of shape [batch_size, max_time, feature_dim]
# batch_size=2, max_time=4, feature_dim=3
sequence = torch.randn(2, 4, 3)

# Create a sequence_length tensor of shape [batch_size]
# Indicating the actual length of each sequence in the batch
sequence_length = torch.LongTensor([3, 2])

ARGS = {
    "sequence": sequence,
    "sequence_length": sequence_length,
    "average_across_batch": True,
    "average_across_timesteps": False,
    "sum_over_batch": False,
    "sum_over_timesteps": True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 1, dtype family float, shape (3,) — shape (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
reduce_batch_time Ran
ran on a synthesized input
eff-kay/temp-texar-repo/texar/losses/losses_utils.py
code served (permissive licence) · get_code("cf2417554b269567")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned EagerTensor, ndim 1, dtype family float, shape (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 simple sequence tensor of shape [batch_size, max_time, feature_dim]
# batch_size=2, max_time=4, feature_dim=3
sequence = tf.constant(np.random.randn(2, 4, 3).astype(np.float32))

# Create sequence_length tensor indicating the actual length of each sequence in the batch
# For batch_size=2, we have two different sequence lengths
sequence_length = tf.constant([3, 2], dtype=tf.int32)

ARGS = {
    'sequence': sequence,
    'sequence_length': sequence_length,
    'average_across_batch': True,
    'average_across_timesteps': False,
    'sum_over_batch': False,
    'sum_over_timesteps': 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 EagerTensor, ndim 1, dtype family float, shape (3,) — shape (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
reduce_dimensions Ran
ran on a synthesized input
eff-kay/temp-texar-repo/texar/losses/losses_utils.py
code served (permissive licence) · get_code("969098d450751076")
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, 5) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tensorflow as tf

# Create a simple tensor with shape (2, 4, 3, 5)
tensor = tf.constant([[[[1.0, 2.0, 3.0, 4.0, 5.0],
                         [6.0, 7.0, 8.0, 9.0, 10.0],
                         [11.0, 12.0, 13.0, 14.0, 15.0]],
                        [[16.0, 17.0, 18.0, 19.0, 20.0],
                         [21.0, 22.0, 23.0, 24.0, 25.0],
                         [26.0, 27.0, 28.0, 29.0, 30.0]],
                        [[31.0, 32.0, 33.0, 34.0, 35.0],
                         [36.0, 37.0, 38.0, 39.0, 40.0],
                         [41.0, 42.0, 43.0, 44.0, 45.0]],
                        [[46.0, 47.0, 48.0, 49.0, 50.0],
                         [51.0, 52.0, 53.0, 54.0, 55.0],
                         [56.0, 57.0, 58.0, 59.0, 60.0]]],
                       [[[61.0, 62.0, 63.0, 64.0, 65.0],
                         [66.0, 67.0, 68.0, 69.0, 70.0],
                         [71.0, 72.0, 73.0, 74.0, 75.0]],
                        [[76.0, 77.0, 78.0, 79.0, 80.0],
                         [81.0, 82.0, 83.0, 84.0, 85.0],
                         [86.0, 87.0, 88.0, 89.0, 90.0]],
                        [[91.0, 92.0, 93.0, 94.0, 95.0],
                         [96.0, 97.0, 98.0, 99.0, 100.0],
                         [101.0, 102.0, 103.0, 104.0, 105.0]],
                        [[106.0, 107.0, 108.0, 109.0, 110.0],
                         [111.0, 112.0, 113.0, 114.0, 115.0],
                         [116.0, 117.0, 118.0, 119.0, 120.0]]]])

ARGS = {
    "tensor": tensor,
    "average_axes": [1, 2],
    "sum_axes": None,
    "keepdims": False
}
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, 5) — shape (2, 5) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
wrap_builtin_cell Not yet run
unverified (harvested, no recorded run)
asyml/texar-pytorch/texar/torch/core/cell_wrappers.py
code served (permissive licence) · get_code("0b155fce843aab77")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 2 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 2 later) and 10 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
binary_adversarial_losses 1 other paper
1 later
1810.06526 (2018-10)
Structured Content Preservation for Unsupervised Text Style Transfer
get_rnn_cell_trainable_variables 1 other paper
1 later
1810.06526 (2018-10)
Structured Content Preservation for Unsupervised Text Style Transfer

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

We introduce Texar, an open-source toolkit aiming to support the broad set of text generation tasks that transform any inputs into natural language, such as machine translation, summarization, dialog, content manipulation, and so forth. With the design goals of modularity, versatility, and extensibility in mind, Texar extracts common patterns underlying the diverse tasks and methodologies, creates a library of highly reusable modules, and allows arbitrary model architectures and algorithmic paradigms. In Texar, model architecture, inference, and learning processes are properly decomposed. Modules at a high concept level can be freely assembled and plugged in/swapped out. The toolkit also supports a rich set of large-scale pretrained models. Texar is thus particularly suitable for researchers and practitioners to do fast prototyping and experimentation. The versatile toolkit also fosters technique sharing across different text generation tasks. Texar supports both TensorFlow and PyTorch, and is released under Apache License 2.0 at https://www.texar.io.

For agents

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

get_harvested_code_for_paper("1809.00794")
get_code_for_paper("1809.00794")
have("1809.00794")

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

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

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

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

Connect an agent — have() is free.