espnet2.gan_codec.shared.discriminator.msmpmb_discriminator.MultiScaleMultiPeriodMultiBandDiscriminator
espnet2.gan_codec.shared.discriminator.msmpmb_discriminator.MultiScaleMultiPeriodMultiBandDiscriminator
class espnet2.gan_codec.shared.discriminator.msmpmb_discriminator.MultiScaleMultiPeriodMultiBandDiscriminator(rates: list = [], fft_sizes: list = [2048, 1024, 512], sample_rate: int = 44100, periods: List[int] = [2, 3, 5, 7, 11], period_discriminator_params: Dict[str, Any] = {'bias': True, 'channels': 32, 'downsample_scales': [3, 3, 3, 3, 1], 'in_channels': 1, 'kernel_sizes': [5, 3], 'max_downsample_channels': 1024, 'nonlinear_activation': 'LeakyReLU', 'nonlinear_activation_params': {'negative_slope': 0.1}, 'out_channels': 1, 'use_spectral_norm': False, 'use_weight_norm': True}, band_discriminator_params: Dict[str, Any] = {'bands': [(0.0, 0.1), (0.1, 0.25), (0.25, 0.5), (0.5, 0.75), (0.75, 1.0)], 'channel': 32, 'hop_factor': 0.25, 'sample_rate': 24000})
Bases: Module
Discriminator that combines multiple discriminators.
- Parameters:
- rates (list , optional) – sampling rates (in Hz) to run MSD at, by default [] If empty, MSD is not used.
- periods (list , optional) – periods (of samples) to run MPD at, by default [2, 3, 5, 7, 11]
- fft_sizes (list , optional) – Window sizes of the FFT to run MRD at, by default [2048, 1024, 512]
- sample_rate (int , optional) – Sampling rate of audio in Hz, by default 44100
- bands (list , optional) – Bands to run MRD at, by default BANDS
forward(x)
Defines the computation performed at every call.
Should be overridden by all subclasses.
NOTE
Although the recipe for forward pass needs to be defined within this function, one should call the Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
preprocess(y)