espnet2.gan_codec.shared.discriminator.msstft_discriminator.MultiScaleSTFTDiscriminator
espnet2.gan_codec.shared.discriminator.msstft_discriminator.MultiScaleSTFTDiscriminator
class espnet2.gan_codec.shared.discriminator.msstft_discriminator.MultiScaleSTFTDiscriminator(filters: int, in_channels: int = 1, out_channels: int = 1, sep_channels: bool = False, n_ffts: List[int] = [1024, 2048, 512], hop_lengths: List[int] = [256, 512, 128], win_lengths: List[int] = [1024, 2048, 512], **kwargs)
Bases: MultiDiscriminator
Multi-Scale STFT (MS-STFT) discriminator.
- Parameters:
- filters (int) – Number of filters in convolutions.
- in_channels (int) – Number of input channels.
- out_channels (int) – Number of output channels.
- sep_channels (bool) – Separate channels to distinct samples for stereo support.
- n_ffts (Sequence *[*int ]) – Size of FFT for each scale.
- hop_lengths (Sequence *[*int ]) – Length of hop between STFT windows for each scale.
- win_lengths (Sequence *[*int ]) – Window size for each scale.
- **kwargs – Additional args for STFTDiscriminator.
forward(x: Tensor)
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.
property num_discriminators
Number of discriminators.