class_docstr: HiFiGAN Periodic Discriminator
  
  Takes every Pth value from the input waveform and applied a stack of convoluations.
  
  Note:
      if `period` is 2
      `waveform = [1, 2, 3, 4, 5, 6 ...] --> [1, 3, 5 ... ] --> convs -> score, feat`
  
  Args:
      x (Tensor): input waveform.
  
  Returns:
      [Tensor]: discriminator scores per sample in the batch.
      [List[Tensor]]: list of features from each convolutional layer.
  
  Shapes:
      x: [B, 1, T]
code: def __init__(
      self, period, kernel_size=5, stride=3, use_spectral_norm=False
  ):
      super().__init__()
      self.period = period
      get_padding = lambda k, d: int((k * d - d) / 2)
      norm_f = (
          nn.utils.spectral_norm
          if use_spectral_norm
          else nn.utils.parametrizations.weight_norm
      )
      self.convs = nn.ModuleList(
          [
              norm_f(
                  nn.Conv2d(
                      1,
                      32,
                      (kernel_size, 1),
                      (stride, 1),
                      padding=(get_padding(kernel_size, 1), 0),
                  )
              ),
              norm_f(
                  nn.Conv2d(
                      32,
                      128,
                      (kernel_size, 1),
                      (stride, 1),
                      padding=(get_padding(kernel_size, 1), 0),
                  )
              ),
              norm_f(
                  nn.Conv2d(
                      128,
                      512,
                      (kernel_size, 1),
                      (stride, 1),
                      padding=(get_padding(kernel_size, 1), 0),
                  )
              ),
              norm_f(
                  nn.Conv2d(
                      512,
                      1024,
                      (kernel_size, 1),
                      (stride, 1),
                      padding=(get_padding(kernel_size, 1), 0),
                  )
              ),
              norm_f(
                  nn.Conv2d(
                      1024, 1024, (kernel_size, 1), 1, padding=(2, 0)
                  )
              ),
          ]
      )
      self.conv_post = norm_f(
          nn.Conv2d(1024, 1, (3, 1), 1, padding=(1, 0))
      )
  
imports: import torch
  from torch import nn
  from torch.nn import functional
label_desc: Use image node_id 1 to create a new DiscriminatorP object from inherited base classes: torch.nn with example: obj = DiscriminatorP(period, kernel_size, stride, use_spectral_norm)