espnet2.gan_tts.style_melgan.tade_res_block.TADEResBlock
Less than 1 minute
espnet2.gan_tts.style_melgan.tade_res_block.TADEResBlock
class espnet2.gan_tts.style_melgan.tade_res_block.TADEResBlock(in_channels: int = 64, aux_channels: int = 80, kernel_size: int = 9, dilation: int = 2, bias: bool = True, upsample_factor: int = 2, upsample_mode: str = 'nearest', gated_function: str = 'softmax')
Bases: Module
TADEResBlock module.
Initialize TADEResBlock 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.
- gated_function (str) β Gated function type (softmax of sigmoid).
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 auxirialy tensor (B, in_channels, T * in_upsample_factor).
- Return type: Tensor
