espnet2.tts.prodiff.denoiser.ResidualBlock
Less than 1 minute
espnet2.tts.prodiff.denoiser.ResidualBlock
class espnet2.tts.prodiff.denoiser.ResidualBlock(adim: int, channels: int, dilation: int)
Bases: Module
Residual Block for Diffusion Denoiser.
Initialization.
- Parameters:
- adim (int) – Size of dimensions.
- channels (int) – Number of channels.
- dilation (int) – Size of dilations.
forward(x: Tensor, condition: Tensor, step: Tensor) → Tensor
Calculate forward propagation.
- Parameters:
- x (torch.Tensor) – Input tensor.
- condition (torch.Tensor) – Conditioning tensor.
- step (torch.Tensor) – Number of diffusion step.
- Returns: Output tensor.
- Return type: Union[torch.Tensor, torch.Tensor]