espnet2.gan_tts.parallel_wavegan.upsample.Stretch2d
Less than 1 minute
espnet2.gan_tts.parallel_wavegan.upsample.Stretch2d
class espnet2.gan_tts.parallel_wavegan.upsample.Stretch2d(x_scale: int, y_scale: int, mode: str = 'nearest')
Bases: Module
Stretch2d module.
Initialize Stretch2d module.
- Parameters:
- x_scale (int) – X scaling factor (Time axis in spectrogram).
- y_scale (int) – Y scaling factor (Frequency axis in spectrogram).
- mode (str) – Interpolation mode.
forward(x: Tensor) → Tensor
Calculate forward propagation.
- Parameters:x (Tensor) – Input tensor (B, C, F, T).
- Returns: Interpolated tensor (B, C, F * y_scale, T * x_scale),
- Return type: Tensor