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