espnet.utils.training.iterators.ToggleableShufflingSerialIterator
Less than 1 minute
espnet.utils.training.iterators.ToggleableShufflingSerialIterator
class espnet.utils.training.iterators.ToggleableShufflingSerialIterator(dataset, batch_size, repeat=True, shuffle=True)
Bases: SerialIterator
A SerialIterator having its shuffling property activated during training.
Init the Iterator.
- Parameters:
- dataset (torch.nn.Tensor) – The dataset to take batches from
- batch_size (int) – The batch size
- repeat (bool) – Whether to repeat data (allow multiple epochs)
- shuffle (bool) – Whether to shuffle the batches
start_shuffle()
Start shuffling (or reshuffles) the batches.