espnet2.asr.transducer.rnnt_multi_blank.utils.cpu_utils.cpu_rnnt.CpuRNNT_index
Less than 1 minute
espnet2.asr.transducer.rnnt_multi_blank.utils.cpu_utils.cpu_rnnt.CpuRNNT_index
class espnet2.asr.transducer.rnnt_multi_blank.utils.cpu_utils.cpu_rnnt.CpuRNNT_index(U: int, maxU: int, minibatch: int, alphabet_size: int, batch_first: bool)
Bases: object
A placeholder Index computation class that emits the resolved index in a
flattened tensor, mimicing pointer indexing in CUDA kernels on the CPU.
- Parameters:
- U – Length of the current target sample (without padding).
- maxU – Max Length of the padded target samples.
- minibatch – Minibatch index
- alphabet_size – Size of the vocabulary including RNNT blank - V+1.
- batch_first – Bool flag determining if batch index is first or third.