espnet2.gan_tts.jets.loss.ForwardSumLoss
Less than 1 minute
espnet2.gan_tts.jets.loss.ForwardSumLoss
class espnet2.gan_tts.jets.loss.ForwardSumLoss
Bases: Module
Forwardsum loss described at https://openreview.net/forum?id=0NQwnnwAORi
Initialize forwardsum loss module.
forward(log_p_attn: Tensor, ilens: Tensor, olens: Tensor, blank_prob: float = 0.36787944117144233) → Tensor
Calculate forward propagation.
- Parameters:
- log_p_attn (Tensor) – Batch of log probability of attention matrix (B, T_feats, T_text).
- ilens (Tensor) – Batch of the lengths of each input (B,).
- olens (Tensor) – Batch of the lengths of each target (B,).
- blank_prob (float) – Blank symbol probability.
- Returns: forwardsum loss value.
- Return type: Tensor