Smallest batch size divisor that is supported for any reproducible output This is because
Noise: creates deterministic noise batches in advance, for speed.
This batch size is a nice trade-off between speed and memory consumption. On a typical GPU this consumes ~2.3GB of memory for the default Voice. Learn more about batch processing.
If a train/test split is desired, 10% of the samples are marked as test. Because researchers with larger GPUs seek higher-throughput with batchsize 1024, $9 cdot 1024$ samples are designated as train, the next 1024 samples as test, etc.
SynthConfig(batch_size=128, sample_rate=44100, buffer_size_seconds=4.0, control_rate=441, reproducible=True, no_grad=True, debug=False, eps=1e-06)¶
int) – Scalar that indicates how many parameter settings there are, i.e. how many different sounds to generate.
buffer_size – Duration of the output in seconds.
bool) – Disables gradient computations.
bool) – Run slow assertion tests. (Default: False, unless environment variable TORCHSYNTH_DEBUG exists.)
float) – Epsilon to avoid log underrun and divide by zero.
For speed, we’ve noticed that it is only helpful to have sample and control rates on device, and as a float.
This method is called automatically if your
Reproducible results are important to torchsynth and synth1B1, so we are testing to make sure that the expected random results are produced by torch.rand when seeded. This raises an error indicating if reproducibility is not guaranteed.
Running torch.rand on CPU and GPU give different results, so all seeded randomization where reproducibility is important occurs on the CPU and then is transferred over to the GPU, if one is being used. See https://discuss.pytorch.org/t/deterministic-prng-across-cpu-cuda/116275
torchcsprng allowed for determinism between the CPU and GPU, however profiling indicated that torch.rand on CPU was more efficient. See https://github.com/pytorch/csprng/issues/126