Discriminator implementations mostly used for GAN-based post-filters.

All the discriminators must returns list of tensors. The last tensor of the list is regarded as the output of the discrminator. The others are used as intermedieate feature maps.


class nnsvs.discriminators.Conv2dD(in_dim=None, channels=64, kernel_size=(5, 3), padding=(0, 0), last_sigmoid=False, init_type='kaiming_normal', padding_mode='zeros')[source]

Conv2d-based discriminator

The implementation follows the discrimiantor of the GAN-based post-filters in Kaneko et al. [KTKY17b].

  • in_dim (int) – Input feature dim

  • channels (int) – Number of channels

  • kernel_size (tuple) – Kernel size for 2d-convolution

  • padding (tuple) – Padding for 2d-convolution

  • last_sigmoid (bool) – If True, apply sigmoid on the output

  • init_type (str) – Initialization type

  • padding_mode (str) – Padding mode