espnet2.asr.transducer.rnnt_multi_blank.utils.cuda_utils.gpu_rnnt_kernel.logp
Less than 1 minute
espnet2.asr.transducer.rnnt_multi_blank.utils.cuda_utils.gpu_rnnt_kernel.logp
espnet2.asr.transducer.rnnt_multi_blank.utils.cuda_utils.gpu_rnnt_kernel.logp(denom: Tensor, acts: Tensor, maxT: int, maxU: int, alphabet_size: int, mb: int, t: int, u: int, v: int)
Compute the sum of log probability from the activation tensor
and its denominator.
- Parameters:
- denom – Tensor of shape [B, T, U] flattened. Represents the denominator of the logprobs activation tensor across entire vocabulary.
- acts – Tensor of shape [B, T, U, V+1] flattened. Represents the logprobs activation tensor.
- maxT – The maximum possible acoustic sequence length. Represents T in the logprobs tensor.
- maxU – The maximum possible target sequence length. Represents U in the logprobs tensor.
- alphabet_size – The vocabulary dimension V+1 (inclusive of RNNT blank).
- mb – Batch indexer.
- t – Acoustic sequence timestep indexer.
- u – Target sequence timestep indexer.
- v – Vocabulary token indexer.
- Returns: The sum of logprobs[mb, t, u, v] + denom[mb, t, u]