espnet2.asr.transducer.rnnt_multi_blank.rnnt_multi_blank.multiblank_rnnt_loss
Less than 1 minute
espnet2.asr.transducer.rnnt_multi_blank.rnnt_multi_blank.multiblank_rnnt_loss
espnet2.asr.transducer.rnnt_multi_blank.rnnt_multi_blank.multiblank_rnnt_loss(acts, labels, act_lens, label_lens, blank, big_blank_durations=[], reduction='mean', fastemit_lambda: float = 0.0, clamp: float = 0.0)
Multi-blank RNN Transducer (https://arxiv.org/pdf/2211.03541.pdf)
Loss (functional form) :param acts: Tensor of (batch x seqLength x labelLength x outputDim) containing :param output from network: :param labels: 2 dimensional Tensor containing all the targets of the batch with
zero padded
- Parameters:
- act_lens – Tensor of size (batch) containing size of each output sequence from the network
- label_lens – Tensor of (batch) containing label length of each example
- blank (int) – standard blank label.
- big_blank_durations – list of durations for multi-blank transducer, e.g. [2, 4, 8].
- sigma – hyper-parameter for logit under-normalization method for training multi-blank transducers. Recommended value 0.05.
- https (Refer to) – //arxiv.org/pdf/2211.03541 for detailed explanations for the last two params.
- reduction (string , optional) – Specifies the reduction to apply to the output: ‘none’ | ‘mean’ | ‘sum’. ‘none’: no reduction will be applied, ‘mean’: the output losses will be divided by the target lengths and then the mean over the batch is taken. Default: ‘mean’