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]
