espnet2.samplers.unsorted_batch_sampler.UnsortedBatchSampler
Less than 1 minute
espnet2.samplers.unsorted_batch_sampler.UnsortedBatchSampler
class espnet2.samplers.unsorted_batch_sampler.UnsortedBatchSampler(batch_size: int, key_file: str, drop_last: bool = False, utt2category_file: str | None = None)
Bases: AbsSampler
BatchSampler with constant batch-size.
Any sorting is not done in this class, so no length information is required, This class is convenient for decoding mode, or not seq2seq learning e.g. classification.
- Parameters:
- batch_size
- key_file