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.
Initialize 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
