HiFiGANVocoder¶
- 類 torchaudio.prototype.models.HiFiGANVocoder(in_channels: int, upsample_rates: Tuple[int, ...], upsample_initial_channel: int, upsample_kernel_sizes: Tuple[int, ...], resblock_kernel_sizes: Tuple[int, ...], resblock_dilation_sizes: Tuple[Tuple[int, ...], ...], resblock_type: int, lrelu_slope: float)[source]¶
HiFi GAN 的生成器部分 [Kong et al., 2020]. 來源: https://github.com/jik876/hifi-gan/blob/4769534d45265d52a904b850da5a622601885777/models.py#L75
注意
要構建此模型,請使用以下工廠函式之一:
hifigan_vocoder(),hifigan_vocoder_v1(),hifigan_vocoder_v2(),hifigan_vocoder_v3()。- 引數:
in_channels (int) – 輸入特徵中的通道數。
upsample_rates (tuple of
int) – 每個上取樣層增加時間維度的因子。upsample_initial_channel (int) – 輸入特徵張量中的通道數。
upsample_kernel_sizes (tuple of
int) – 每個上取樣層的核大小。resblock_kernel_sizes (tuple of
int) – 每個殘差塊的核大小。resblock_dilation_sizes (tuple of tuples of
int) – 每個殘差塊中每個 1D 卷積層的擴張大小。對於殘差塊型別 1,內部元組應具有長度 3,因為每個層中有 3 個卷積。對於殘差塊型別 2,它們應具有長度 2。resblock_type (int, 1 or 2) – 確定將使用
ResBlock1還是ResBlock2。lrelu_slope (float) – 啟用函式中 leaky ReLU 的斜率。
方法¶
forward¶
工廠函式¶
構建 HiFi GAN Vocoder [Kong et al., 2020]。 |
|
構建具有 V1 架構的 HiFiGAN Vocoder [Kong et al., 2020]。 |
|
構建具有 V2 架構的 HiFiGAN Vocoder [Kong et al., 2020]。 |
|
構建具有 V3 架構的 HiFiGAN Vocoder [Kong et al., 2020]。 |