espnet2.gan_tts.vits.flow.FlipFlow
Less than 1 minute
espnet2.gan_tts.vits.flow.FlipFlow
class espnet2.gan_tts.vits.flow.FlipFlow(*args, **kwargs)
Bases: Module
Flip flow module.
Initializes internal Module state, shared by both nn.Module and ScriptModule.
forward(x: Tensor, *args, inverse: bool = False, **kwargs) → Tensor | Tuple[Tensor, Tensor]
Calculate forward propagation.
- Parameters:
- x (Tensor) – Input tensor (B, channels, T).
- inverse (bool) – Whether to inverse the flow.
- Returns: Flipped tensor (B, channels, T). Tensor: Log-determinant tensor for NLL (B,) if not inverse.
- Return type: Tensor