espnet2.gan_tts.style_melgan.tade_res_block.TADELayer
Less than 1 minute
espnet2.gan_tts.style_melgan.tade_res_block.TADELayer
class espnet2.gan_tts.style_melgan.tade_res_block.TADELayer(in_channels: int = 64, aux_channels: int = 80, kernel_size: int = 9, bias: bool = True, upsample_factor: int = 2, upsample_mode: str = 'nearest')
Bases: Module
TADE Layer module.
Initilize TADELayer module.
- Parameters:
- in_channels (int) β Number of input channles.
- aux_channels (int) β Number of auxirialy channles.
- kernel_size (int) β Kernel size.
- bias (bool) β Whether to use bias parameter in conv.
- upsample_factor (int) β Upsample factor.
- upsample_mode (str) β Upsample mode.
forward(x: Tensor, c: Tensor) β Tensor
Calculate forward propagation.
- Parameters:
- x (Tensor) β Input tensor (B, in_channels, T).
- c (Tensor) β Auxiliary input tensor (B, aux_channels, Tβ).
- Returns: Output tensor (B, in_channels, T * in_upsample_factor). Tensor: Upsampled aux tensor (B, in_channels, T * aux_upsample_factor).
- Return type: Tensor
