espnet2.asr.transducer.rnnt_multi_blank.utils.cpu_utils.cpu_rnnt.CpuRNNT_metadata
Less than 1 minute
espnet2.asr.transducer.rnnt_multi_blank.utils.cpu_utils.cpu_rnnt.CpuRNNT_metadata
class espnet2.asr.transducer.rnnt_multi_blank.utils.cpu_utils.cpu_rnnt.CpuRNNT_metadata(T: int, U: int, workspace: Tensor, bytes_used: int, blank: int, labels: Tensor, log_probs: Tensor, idx: CpuRNNT_index)
Bases: object
Metadata for CPU based RNNT loss calculation. Holds the working space memory.
- Parameters:
- T – Length of the acoustic sequence (without padding).
- U – Length of the target sequence (without padding).
- workspace – Working space memory for the CPU.
- bytes_used – Number of bytes currently used for indexing the working space memory. Generally 0.
- blank – Index of the blank token in the vocabulary.
- labels – Ground truth padded labels matrix of shape [B, U]
- log_probs – Log probs / activation matrix of flattented shape [B, T, U, V+1]
- idx
setup_probs(T: int, U: int, labels: Tensor, blank: int, log_probs: Tensor, idx: CpuRNNT_index)