SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1804.09399 · 2018

Convolutional Generative Adversarial Networks with Binary Neurons for Polyphonic Music Generation

arXiv · PDF · Open in the Atlas

Code that ran

19 of 35 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 17 have no contract verdict; 2 failures of our instrument; 16 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/1804.09399.json · badge: /api/ran/1804.09399.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
salu133445/musegan canonical (classifier label)
classifier basis: census
8 ran · 12 no recorded run
lucylow/Stochastic_SoundCloud community (classifier label)
classifier basis not recorded on the link
10 ran · 3 no recorded run
salu133445/bmusegan community (classifier label)
classifier basis not recorded on the link
1 ran · 1 no recorded run
FunctionStatusWhere it lives
batch Ran
ran on a synthesized input
lucylow/Stochastic_SoundCloud/common/state_util.py
code served (permissive licence) · get_code("72dcc8b76ef3181d")
How it ran

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

import numpy as np
import tensorflow.compat.v1 as tf

tf.disable_v2_behavior()

# Create sample nested state structures
# Each state can be a dict, tuple, or list containing numpy arrays

# Example 1: Simple numpy array states
state1 = np.random.randn(3, 4).astype(np.float32)
state2 = np.random.randn(3, 4).astype(np.float32)
state3 = np.random.randn(3, 4).astype(np.float32)

states_simple = [state1, state2, state3]

# Example 2: Nested dict of arrays (more complex structure)
nested_state1 = {
    'position': np.random.randn(2, 5).astype(np.float32),
    'velocity': np.random.randn(2, 3).astype(np.float32)
}
nested_state2 = {
    'position': np.random.randn(2, 5).astype(np.float32),
    'velocity': np.random.randn(2, 3).astype(np.float32)
}

states_nested = [nested_state1, nested_state2]

# Example 3: Tuple of arrays
tuple_state1 = (np.random.randn(2, 4).astype(np.float32), np.random.randn(2, 6).astype(np.float32))
tuple_state2 = (np.random.randn(2, 4).astype(np.float32), np.random.randn(2, 6).astype(np.float32))

states_tuple = [tuple_state1, tuple_state2]

# Test case 1: Simple states with batch_size
ARGS = {
    'states': states_simple,
    'batch_size': 8
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family float, shape (8, 3, 4) — shape (8, 3, 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
beam_search Ran
ran; our contract draft was wrong, not the code
lucylow/Stochastic_SoundCloud/common/beam_search.py
code served (permissive licence) · get_code("fc965e87e24dc01d")
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 copy
import torch

torch.manual_seed(0)

# Define a simple generate_step_fn that extends sequences and updates states/scores
def generate_step_fn(sequences, states, scores):
    """
    Extends each sequence by one step, updates state, and updates score.
    
    Args:
        sequences: list of sequences (each is a list of integers)
        states: list of states (each is a dict with 'step_count')
        scores: list of scores (floats)
    
    Returns:
        tuple of (extended_sequences, updated_states, updated_scores)
    """
    new_sequences = []
    new_states = []
    new_scores = []
    
    for seq, state, score in zip(sequences, states, scores):
        # Extend sequence by appending next token (simple: just append step_count)
        new_seq = seq + [state['step_count']]
        
        # Update state: increment step_count
        new_state = copy.deepcopy(state)
        new_state['step_count'] += 1
        
        # Update score: add a small random bonus
        new_score = score + torch.randn(1).item() * 0.1
        
        new_sequences.append(new_seq)
        new_states.append(new_state)
        new_scores.append(new_score)
    
    return new_sequences, new_states, new_scores


# Define initial sequence and state
initial_sequence = [0, 1]
initial_state = {'step_count': 2, 'hidden': torch.randn(4)}

ARGS = {
    'initial_sequence': initial_sequence,
    'initial_state': initial_state,
    'generate_step_fn': generate_step_fn,
    'num_steps': 8,
    'beam_size': 3,
    'branch_factor': 2,
    'steps_per_iteration': 2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
bernoulli_sample Ran
ran on a synthesized input
lucylow/Stochastic_SoundCloud/contrib/seq2seq.py
code served (permissive licence) · get_code("81e8010ff4bdf083")
How it ran

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

import tensorflow.compat.v1 as tf

tf.disable_v2_behavior()

# Create small tensor arguments
probs_tensor = tf.constant([[0.3, 0.7, 0.5, 0.2]], dtype=tf.float32)  # shape (1, 4)
logits_tensor = tf.constant([[0.0, 1.0, -1.0, 0.5]], dtype=tf.float32)  # shape (1, 4)
sample_shape_scalar = tf.constant(2, dtype=tf.int32)  # scalar
sample_shape_vector = tf.constant([2, 3], dtype=tf.int32)  # vector

ARGS = {
    'probs': probs_tensor,
    'logits': None,
    'dtype': tf.int32,
    'sample_shape': sample_shape_scalar,
    'seed': 42
}
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 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
bernoulli_sample_ST Ran
ran on a synthesized input
salu133445/musegan/src/musegan/presets/binary_ops.py
code served (permissive licence) · get_code("8ce6f7e771817722")
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 3, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tensorflow as tf
from tensorflow.python.framework import ops

# Create a mock custom operation
class MockOp:
    def __init__(self):
        self.inputs = [
            tf.constant([[1.0, 0.0], [0.0, 1.0]]),
            tf.constant([[0.3, 0.7], [0.5, 0.5]])
        ]

# Create gradient tensor matching the output of the operation
op = MockOp()
grad = tf.constant([[1.0, 2.0], [3.0, 4.0]])

ARGS = {
    'op': op,
    'grad': grad
}
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 list, ndim 3, 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
categorical_sample Ran
ran on a synthesized input
lucylow/Stochastic_SoundCloud/contrib/seq2seq.py
code served (permissive licence) · get_code("a2c9cba2b7f47fee")
How it ran

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

import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()

# Construct logits tensor: shape [batch_size=2, num_categories=4]
logits = tf.constant([[1.0, 2.0, 3.0, 4.0],
                      [2.0, 1.0, 4.0, 3.0]], dtype=tf.float32)

# Define sample_shape as a scalar or tuple
sample_shape = (3,)

# Define dtype for output samples
dtype = tf.int32

# Define seed for reproducibility
seed = 42

ARGS = {
    'logits': logits,
    'dtype': dtype,
    'sample_shape': sample_shape,
    'seed': seed
}
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 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
count_records Ran
ran on a synthesized input
lucylow/Stochastic_SoundCloud/common/sequence_example_lib.py
code served (permissive licence) · get_code("bc6f9dfce1745ff3")
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 tempfile
import os
import tensorflow.compat.v1 as tf

# Disable TensorFlow v2 behavior
tf.disable_v2_behavior()

# Create temporary TFRecord files for testing
def create_test_tfrecord(filepath, num_records=5):
    """Create a simple TFRecord file with test data."""
    writer = tf.python_io.TFRecordWriter(filepath)
    for i in range(num_records):
        example = tf.train.Example(features=tf.train.Features(
            feature={
                'value': tf.train.Feature(int64_list=tf.train.Int64List(value=[i]))
            }
        ))
        writer.write(example.SerializeToString())
    writer.close()

# Create temporary directory and files
temp_dir = tempfile.mkdtemp()
tfrecord_file_1 = os.path.join(temp_dir, 'test_1.tfrecord')
tfrecord_file_2 = os.path.join(temp_dir, 'test_2.tfrecord')

create_test_tfrecord(tfrecord_file_1, num_records=3)
create_test_tfrecord(tfrecord_file_2, num_records=4)

ARGS = {
    'file_list': [tfrecord_file_1, tfrecord_file_2],
    'stop_at': 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 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
extract_state Ran
ran on a synthesized input
lucylow/Stochastic_SoundCloud/common/state_util.py
code served (permissive licence) · get_code("51c03ee8f4639255")
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.compat.v1 as tf
import numpy as np

# Disable TF v2 behavior
tf.disable_v2_behavior()

# Create a nested structure of batched states
# The function uses tf.nest.map_structure with lambda x: x[i]
# So we need tensors where the first dimension is the batch dimension

# Create a simple nested structure: a dict with some tensors
batched_state_dict = {
    'tensor1': tf.constant(np.random.randn(5, 4, 3), dtype=tf.float32),
    'tensor2': tf.constant(np.random.randn(5, 2), dtype=tf.float32),
    'nested': {
        'tensor3': tf.constant(np.random.randn(5, 6), dtype=tf.float32)
    }
}

# Index to extract (must be valid for batch dimension of size 5)
index = 2

ARGS = {
    'batched_states': batched_state_dict,
    'i': index
}
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 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
get_normalization Ran
ran on a synthesized input
salu133445/musegan/src/musegan/presets/ops.py
code served (permissive licence) · get_code("6c50317414bf1d88")
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

# Test with different norm_type values
# The function takes norm_type and training parameters

# Create a simple test input tensor
test_input = tf.constant(np.random.randn(2, 4).astype(np.float32))

# Define ARGS dict with all parameters
ARGS = {
    'norm_type': 'batch_norm',
    'training': 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 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
get_npy_files Ran
ran on a synthesized input
salu133445/bmusegan/analysis/merge_eval_files.py
code served (permissive licence) · get_code("0d5e91e50a8f56c1")
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 os
import tempfile
import shutil

# Create a temporary directory with some .npy files
temp_dir = tempfile.mkdtemp()
try:
    # Create some dummy .npy files
    open(os.path.join(temp_dir, 'file1.npy'), 'w').close()
    open(os.path.join(temp_dir, 'file2.npy'), 'w').close()
    open(os.path.join(temp_dir, 'file3.txt'), 'w').close()
    open(os.path.join(temp_dir, 'file4.npy'), 'w').close()
    
    ARGS = {
        'target_dir': temp_dir
    }
finally:
    # Clean up will happen after function execution
    pass
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 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
get_padded_batch Ran
ran on a synthesized input
lucylow/Stochastic_SoundCloud/common/sequence_example_lib.py
code served (permissive licence) · get_code("87e4795b86846544")
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 tensorflow.compat.v1 as tf
import tempfile
import os

tf.disable_v2_behavior()

# Create temporary TFRecord files with SequenceExamples
def create_test_tfrecord(filepath, num_examples=2, input_size=4):
    """Create a small test TFRecord file with SequenceExamples."""
    writer = tf.python_io.TFRecordWriter(filepath)
    
    for _ in range(num_examples):
        # Create a SequenceExample with variable length sequences
        sequence_length = 3
        
        inputs_list = []
        labels_list = []
        
        for _ in range(sequence_length):
            inputs_list.append(tf.train.Feature(float_list=tf.train.FloatList(value=[0.1, 0.2, 0.3, 0.4][:input_size])))
            labels_list.append(tf.train.Feature(int64_list=tf.train.Int64List(value=[1])))
        
        feature_list = {
            'inputs': tf.train.FeatureList(feature=inputs_list),
            'labels': tf.train.FeatureList(feature=labels_list),
        }
        
        sequence_example = tf.train.SequenceExample(
            feature_lists=tf.train.FeatureLists(feature_list=feature_list)
        )
        
        writer.write(sequence_example.SerializeToString())
    
    writer.close()

# Create temporary directory and files
tmpdir = tempfile.mkdtemp()
file_list = []
for i in range(2):
    filepath = os.path.join(tmpdir, f'test_{i}.tfrecord')
    create_test_tfrecord(filepath, num_examples=2, input_size=4)
    file_list.append(filepath)

ARGS = {
    'file_list': file_list,
    'batch_size': 2,
    'input_size': 4,
    'label_shape': None,
    'num_enqueuing_threads': 4,
    'shuffle': 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 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
load_component Ran
ran on a synthesized input
salu133445/musegan/src/musegan/utils.py
code served (permissive licence) · get_code("f683fb5404c42dc8")
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 type. 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 importlib
import sys
from unittest.mock import MagicMock

# Create a mock module structure for musegan.presets.{component}.{name}
# The function uses importlib.import_module and getattr to load a class

# Create mock modules
mock_preset_module = MagicMock()

# Create a mock class that could be returned
class MockComponent:
    def __init__(self):
        pass

# Set up the mock class as an attribute
mock_preset_module.MockGeneratorClass = MockComponent

# Mock the import_module to return our mock module
original_import = importlib.import_module

def mock_import_module(name):
    # If it matches the expected pattern, return our mock
    if 'musegan.presets' in name:
        return mock_preset_module
    return original_import(name)

importlib.import_module = mock_import_module

# Define arguments for the function
ARGS = {
    'component': 'generator',
    'name': 'default',
    'class_name': 'MockGeneratorClass'
}
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 type — a type output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a type 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
load_data_from_npy Ran
ran on a synthesized input
salu133445/musegan/src/musegan/data.py
code served (permissive licence) · get_code("d734bf997af678c8")
How it ran

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

# Create a temporary numpy file for testing
temp_dir = tempfile.gettempdir()
temp_filename = os.path.join(temp_dir, "test_data.npy")

# Create sample data and save it
sample_data = np.random.randn(2, 4).astype(np.float32)
np.save(temp_filename, sample_data)

ARGS = {
    "filename": temp_filename
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 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
load_data_from_npz Ran
ran on a synthesized input
salu133445/musegan/src/musegan/data.py
code served (permissive licence) · get_code("bb4f5986529d5fd6")
How it ran

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

# Create a temporary npz file with sparse data
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test_data.npz")

# Create sparse boolean data
shape = (4, 3)
nonzero_indices = [(0, 1), (2, 0), (3, 2)]

np.savez(temp_file, shape=shape, nonzero=nonzero_indices)

ARGS = {
    "filename": temp_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, 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
load_yaml Ran
ran on a synthesized input
salu133445/musegan/src/musegan/utils.py
code served (permissive licence) · get_code("e9b277604f711d0d")
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 yaml
import tempfile
import os

# Create a temporary YAML file
with tempfile.NamedTemporaryFile(mode='w', suffix='.yaml', delete=False) as f:
    yaml_content = {
        'key1': 'value1',
        'key2': 42,
        'nested': {
            'inner_key': 'inner_value',
            'inner_list': [1, 2, 3]
        }
    }
    yaml.dump(yaml_content, f)
    temp_yaml_file = f.name

try:
    ARGS = {
        'filename': temp_yaml_file
    }
finally:
    # Clean up will happen after the function executes
    pass
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
yaml — 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
log_loss Ran
ran on a synthesized input
lucylow/Stochastic_SoundCloud/common/tf_utils.py
code served (permissive licence) · get_code("b3b4d407f8e308ab")
How it ran

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

import tensorflow.compat.v1 as tf
import numpy as np

# Disable eager execution for TF1 compatibility
tf.disable_eager_execution()

# Create small tensors for labels and predictions
# Using batch size 2, with 4 elements each
labels_np = np.array([[0.0, 1.0, 1.0, 0.0],
                      [1.0, 0.0, 1.0, 1.0]], dtype=np.float32)
predictions_np = np.array([[0.1, 0.9, 0.8, 0.2],
                           [0.95, 0.05, 0.7, 0.85]], dtype=np.float32)
weights_np = np.array([[1.0, 1.0, 2.0, 1.0],
                       [1.0, 1.0, 1.0, 1.5]], dtype=np.float32)

# Convert to TensorFlow tensors
labels = tf.constant(labels_np)
predictions = tf.constant(predictions_np)
weights = tf.constant(weights_np)

ARGS = {
    'labels': labels,
    'predictions': predictions,
    'epsilon': 1e-07,
    'scope': None,
    'weights': weights
}
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
serialized Ran
ran; our contract draft was wrong, not the code
lucylow/Stochastic_SoundCloud/common/concurrency.py
code served (permissive licence) · get_code("51cf513fe9f6c28e")
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 functools
import threading

def serialized(func):
    """Decorator to provide mutual exclusion for method using _lock attribute."""

    @functools.wraps(func)
    def serialized_method(self, *args, **kwargs):
        lock = getattr(self, '_lock')
        with lock:
            return func(self, *args, **kwargs)
    return serialized_method


class MockObject:
    def __init__(self):
        self._lock = threading.Lock()
    
    @serialized
    def example_method(self, x, y):
        return x + y


def dummy_func(self, x, y):
    return x * y


ARGS = {
    'func': dummy_func
}
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 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
to_chroma Ran
ran on a synthesized input
salu133445/musegan/src/musegan/metrics.py
code served (permissive licence) · get_code("90312cb813efe3fa")
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 5, dtype family float, shape (1, 3, 4, 12, 1) 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 5-dimensional pianoroll tensor
# Shape: (batch_size=2, time=3, freq=4, pitch=10, channels=1)
batch_size = 2
time_steps = 3
freq_bins = 4
pitch_bins = 10
channels = 1

pianoroll = tf.constant(
    np.random.rand(batch_size, time_steps, freq_bins, pitch_bins, channels).astype(np.float32)
)

ARGS = {
    'pianoroll': pianoroll
}
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 5, dtype family float, shape (1, 3, 4, 12, 1) — shape (1, 3, 4, 12, 1) 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
unbatch Ran
ran on a synthesized input
lucylow/Stochastic_SoundCloud/common/state_util.py
code served (permissive licence) · get_code("d64893e1f8ad90cf")
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 tensorflow.compat.v1 as tf

tf.disable_v2_behavior()

# Create a simple nested structure with batched states
# The function uses tf.nest.map_structure to extract individual states
# by indexing into the first dimension

# Create batched tensors with batch_size=2
batch_size = 2
state_dim = 4

# Single tensor case
tensor_state = tf.constant([[1.0, 2.0, 3.0, 4.0],
                            [5.0, 6.0, 7.0, 8.0]], dtype=tf.float32)

# Nested structure case (tuple of tensors)
batched_states = (
    tf.constant([[1.0, 2.0, 3.0, 4.0],
                 [5.0, 6.0, 7.0, 8.0]], dtype=tf.float32),
    tf.constant([[10.0, 20.0],
                 [30.0, 40.0]], dtype=tf.float32)
)

# More complex nested structure (dict)
batched_states_dict = {
    'hidden': tf.constant([[1.0, 2.0, 3.0, 4.0],
                           [5.0, 6.0, 7.0, 8.0]], dtype=tf.float32),
    'cell': tf.constant([[10.0, 20.0, 30.0],
                         [40.0, 50.0, 60.0]], dtype=tf.float32)
}

ARGS = {
    'batched_states': batched_states,
    'batch_size': 2
}
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 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
vector_to_image Ran
ran on a synthesized input
salu133445/musegan/src/musegan/io_utils.py
code served (permissive licence) · get_code("dc6c68928b375a62")
How it ran

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

import numpy as np

# Create a small 2D array with shape (batch_size, vector_dim)
# The function expects ndim=2
array = np.random.randn(2, 4).astype(np.float32)

ARGS = {
    "array": array,
    "inverted": True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 4, dtype family int, shape (2, 4, 1, 1) — shape (2, 4, 1, 1) 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
bernoulli_sample Not yet run
unverified (harvested, no recorded run)
salu133445/musegan/src/musegan/presets/binary_ops.py
code served (permissive licence) · get_code("fbd231a75de37d59")
How it ran

no invocation recorded.

binary_round Not yet run
unverified (harvested, no recorded run)
salu133445/musegan/src/musegan/presets/binary_ops.py
code served (permissive licence) · get_code("b64067aff250f5cf")
How it ran

no invocation recorded.

classic_gan_losses Not yet run
unverified (harvested, no recorded run)
salu133445/musegan/src/musegan/losses.py
code served (permissive licence) · get_code("39a7b44290d7f7d6")
How it ran

no invocation recorded.

empty_bar_rate Not yet run
unverified (harvested, no recorded run)
salu133445/musegan/src/musegan/metrics.py
code served (permissive licence) · get_code("8ce975ecee08f7dd")
How it ran

no invocation recorded.

flatten_maybe_padded_sequences Not yet run
unverified (harvested, no recorded run)
lucylow/Stochastic_SoundCloud/common/sequence_example_lib.py
code served (permissive licence) · get_code("b18b2512140259f5")
How it ran

no invocation recorded.

get_adv_losses Not yet run
unverified (harvested, no recorded run)
salu133445/musegan/src/musegan/losses.py
code served (permissive licence) · get_code("db1a7d8ee9203654")
How it ran

no invocation recorded.

get_scheduled_variable Not yet run
unverified (harvested, no recorded run)
salu133445/musegan/src/musegan/model.py
code served (permissive licence) · get_code("59105c64a097b163")
How it ran

no invocation recorded.

image_pair Not yet run
unverified (harvested, no recorded run)
salu133445/musegan/src/musegan/io_utils.py
code served (permissive licence) · get_code("9a217e804461443f")
How it ran

no invocation recorded.

load Not yet run
unverified (harvested, no recorded run)
salu133445/bmusegan/analysis/merge_eval_files.py
code served (permissive licence) · get_code("a4ed6d870fc30eda")
How it ran

no invocation recorded.

load_data Not yet run
unverified (harvested, no recorded run)
salu133445/musegan/src/musegan/data.py
code served (permissive licence) · get_code("152fb17c1e64383c")
How it ran

no invocation recorded.

load_params Not yet run
unverified (harvested, no recorded run)
salu133445/musegan/src/musegan/utils.py
code served (permissive licence) · get_code("88a4709aadaa1849")
How it ran

no invocation recorded.

n_pitches_used Not yet run
unverified (harvested, no recorded run)
salu133445/musegan/src/musegan/metrics.py
code served (permissive licence) · get_code("1267691927b008f3")
How it ran

no invocation recorded.

nonsaturating_gan_losses Not yet run
unverified (harvested, no recorded run)
salu133445/musegan/src/musegan/losses.py
code served (permissive licence) · get_code("d2616d28a605aeb3")
How it ran

no invocation recorded.

parse_test_proto Not yet run
unverified (harvested, no recorded run)
lucylow/Stochastic_SoundCloud/common/testing_lib.py
code served (permissive licence) · get_code("a5f2e04a36847fd6")
How it ran

no invocation recorded.

pianoroll_to_image Not yet run
unverified (harvested, no recorded run)
salu133445/musegan/src/musegan/io_utils.py
code served (permissive licence) · get_code("33779a21ac5427e8")
How it ran

no invocation recorded.

stack_bidirectional_dynamic_rnn Not yet run
unverified (harvested, no recorded run)
lucylow/Stochastic_SoundCloud/contrib/rnn.py
code served (permissive licence) · get_code("cde17b796202395c")
How it ran

no invocation recorded.

Also present in other papers' code

Of 35 samples lifted from this paper's linked repositories, 35 carry a function identity and 0 do not. Of the 35 distinct functions with an identity, 18 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 18 later) and 17 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
beam_search 2 other papers
2 later
1904.02632 (2019-04)
A Learned Representation for Scalable Vector Graphics
2411.07428 (2024-11)
Just Label the Repeats for In-The-Wild Audio-to-Score Alignment
serialized 2 other papers
2 later
1904.02632 (2019-04)
A Learned Representation for Scalable Vector Graphics
2411.07428 (2024-11)
Just Label the Repeats for In-The-Wild Audio-to-Score Alignment
bernoulli_sample 1 other paper
1 later
1904.02632 (2019-04)
A Learned Representation for Scalable Vector Graphics
categorical_sample 1 other paper
1 later
1904.02632 (2019-04)
A Learned Representation for Scalable Vector Graphics
classic_gan_losses 1 other paper
1 later
1901.08753 (2019-01)
On Output Activation Functions for Adversarial Losses: A Theoretical Analysis via Variational Divergence Minimization and An Empirical Study on MNIST Classification
count_records 1 other paper
1 later
1904.02632 (2019-04)
A Learned Representation for Scalable Vector Graphics
extract_state 1 other paper
1 later
1904.02632 (2019-04)
A Learned Representation for Scalable Vector Graphics
flatten_maybe_padded_sequences 1 other paper
1 later
1904.02632 (2019-04)
A Learned Representation for Scalable Vector Graphics
get_normalization 1 other paper
1 later
1901.08753 (2019-01)
On Output Activation Functions for Adversarial Losses: A Theoretical Analysis via Variational Divergence Minimization and An Empirical Study on MNIST Classification
get_padded_batch 1 other paper
1 later
1904.02632 (2019-04)
A Learned Representation for Scalable Vector Graphics
load_data_from_npy 1 other paper
1 later
1901.08753 (2019-01)
On Output Activation Functions for Adversarial Losses: A Theoretical Analysis via Variational Divergence Minimization and An Empirical Study on MNIST Classification
load_params 1 other paper
1 later
1901.08753 (2019-01)
On Output Activation Functions for Adversarial Losses: A Theoretical Analysis via Variational Divergence Minimization and An Empirical Study on MNIST Classification
load_yaml 1 other paper
1 later
1901.08753 (2019-01)
On Output Activation Functions for Adversarial Losses: A Theoretical Analysis via Variational Divergence Minimization and An Empirical Study on MNIST Classification
log_loss 1 other paper
1 later
1904.02632 (2019-04)
A Learned Representation for Scalable Vector Graphics
nonsaturating_gan_losses 1 other paper
1 later
1901.08753 (2019-01)
On Output Activation Functions for Adversarial Losses: A Theoretical Analysis via Variational Divergence Minimization and An Empirical Study on MNIST Classification
parse_test_proto 1 other paper
1 later
1904.02632 (2019-04)
A Learned Representation for Scalable Vector Graphics
stack_bidirectional_dynamic_rnn 1 other paper
1 later
1904.02632 (2019-04)
A Learned Representation for Scalable Vector Graphics
unbatch 1 other paper
1 later
1904.02632 (2019-04)
A Learned Representation for Scalable Vector Graphics

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

It has been shown recently that deep convolutional generative adversarial networks (GANs) can learn to generate music in the form of piano-rolls, which represent music by binary-valued time-pitch matrices. However, existing models can only generate real-valued piano-rolls and require further post-processing, such as hard thresholding (HT) or Bernoulli sampling (BS), to obtain the final binary-valued results. In this paper, we study whether we can have a convolutional GAN model that directly creates binary-valued piano-rolls by using binary neurons. Specifically, we propose to append to the generator an additional refiner network, which uses binary neurons at the output layer. The whole network is trained in two stages. Firstly, the generator and the discriminator are pretrained. Then, the refiner network is trained along with the discriminator to learn to binarize the real-valued piano-rolls the pretrained generator creates. Experimental results show that using binary neurons instead of HT or BS indeed leads to better results in a number of objective measures. Moreover, deterministic binary neurons perform better than stochastic ones in both objective measures and a subjective test. The source code, training data and audio examples of the generated results can be found at https://salu133445.github.io/bmusegan/ .

For agents

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

get_harvested_code_for_paper("1804.09399")
get_code_for_paper("1804.09399")
have("1804.09399")

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

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

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

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

Connect an agent — have() is free.