espnet2.gan_svs.visinger2.visinger2_vocoder.BaseFrequenceDiscriminator
Less than 1 minute
espnet2.gan_svs.visinger2.visinger2_vocoder.BaseFrequenceDiscriminator
class espnet2.gan_svs.visinger2.visinger2_vocoder.BaseFrequenceDiscriminator(in_channels, hidden_channels=512, divisors=[32, 16, 8, 4, 2, 1, 1], strides=[1, 2, 1, 2, 1, 2, 1])
Bases: Module
Base Frequence Discriminator
- Parameters:
- in_channels (int) – Number of input channels.
- hidden_channels (int , optional) – Number of channels in hidden layers. Defaults to 512.
- divisors (List *[*int ] , optional) – List of divisors for the number of channels in each layer. The length of the list determines the number of layers. Defaults to [32, 16, 8, 4, 2, 1, 1].
- strides (List *[*int ] , optional) – List of stride values for each layer. The length of the list determines the number of layers.Defaults to [1, 2, 1, 2, 1, 2, 1].
forward(x)
Perform forward pass through the base frequency discriminator.
- Parameters:x (torch.Tensor) – Input tensor of shape (B, in_channels, freq_bins, time_steps).
- Returns: List of output tensors from each layer of the : discriminator, where the first tensor corresponds to the output of the first layer, and so on.
- Return type: List[torch.Tensor]