Benchmarks Reference#

Synthetic benchmarks for evaluating recurrent architectures. The generators use batch-first tensors, support reproducible torch.Generator instances, and can return either raw tensors or torch.utils.data.DataLoader objects.

adding_problem implements the two-half marker sampling from the canonical adding task. copy_memory implements the categorical T + 20 protocol by default and can one-hot encode inputs for direct use with recurrent layers. sequential_mnist adapts standard MNIST tensors to the sequential and fixed permutation variants without introducing a dataset-download dependency. sequential_cifar10 adapts CIFAR-10 tensors the same way, flattening each image into a 1024-step, 3-channel pixel sequence. penn_treebank prepares licensed, preprocessed PTB split files for canonical word-level language modeling with contiguous truncated-BPTT batches. timit batches aligned 120-dimensional log-Mel, delta, and acceleration features for the canonical 180-state frame-classification protocol.

torchrecurrent.benchmarks.adding_problem

Generate the adding problem introduced for long-term memory tests.

torchrecurrent.benchmarks.copy_memory

Generate the canonical copy-memory benchmark.

torchrecurrent.benchmarks.penn_treebank

Prepare the standard word-level Penn Treebank language-model benchmark.

torchrecurrent.benchmarks.sequential_cifar10

Convert CIFAR-10 tensors into the sequential or permuted-CIFAR task.

torchrecurrent.benchmarks.sequential_mnist

Convert MNIST tensors into the sequential or permuted-MNIST task.

torchrecurrent.benchmarks.timit

Prepare aligned TIMIT features for frame-level phone-state recognition.