espnet2.gan_tts.vits.loss.KLDivergenceLossWithoutFlow
Less than 1 minute
espnet2.gan_tts.vits.loss.KLDivergenceLossWithoutFlow
class espnet2.gan_tts.vits.loss.KLDivergenceLossWithoutFlow(*args, **kwargs)
Bases: Module
KL divergence loss without flow.
Initializes internal Module state, shared by both nn.Module and ScriptModule.
forward(m_q: Tensor, logs_q: Tensor, m_p: Tensor, logs_p: Tensor) → Tensor
Calculate KL divergence loss without flow.
- Parameters:
- m_q (Tensor) – Posterior encoder projected mean (B, H, T_feats).
- logs_q (Tensor) – Posterior encoder projected scale (B, H, T_feats).
- m_p (Tensor) – Expanded text encoder projected mean (B, H, T_feats).
- logs_p (Tensor) – Expanded text encoder projected scale (B, H, T_feats).