class_docstr: HiFiGAN period discriminator module.
docstr: Calculate forward propagation.
  
  Args:
      c (Tensor): Input tensor (B, in_channels, T).
  
  Returns:
      list: List of each layer's tensors.
docstr_tok: ["Calculate","forward","propagation",".","Args",":","c","(","Tensor",")",":","Input","tensor","(","B",",","in_channels",",","T",")",".","Returns",":","list",":","List","of","each","layer","'s","tensors","."]
code: def forward(self, x: torch.Tensor) -> torch.Tensor:
      """Calculate forward propagation.
  
      Args:
          c (Tensor): Input tensor (B, in_channels, T).
  
      Returns:
          list: List of each layer's tensors.
  
      """
      # transform 1d to 2d -> (B, C, T/P, P)
      b, c, t = x.shape
      if t % self.period != 0:
          n_pad = self.period - (t % self.period)
          x = F.pad(x, (0, n_pad), "reflect")
          t += n_pad
      x = x.view(b, c, t // self.period, self.period)
  
      # forward conv
      outs = []
      for layer in self.convs:
          x = layer(x)
          outs += [x]
      x = self.output_conv(x)
      x = torch.flatten(x, 1, -1)
      outs += [x]
  
      return outs
  
imports: import copy
  import logging
  from typing import Any, Dict, List, Optional
  import numpy
  import torch
  import torch.nn.functional
  from espnet2.gan_tts.hifigan.residual_block import ResidualBlock
label_desc: Use image node_id 2 for calling the HiFiGANPeriodDiscriminator obj's underlying member method code with example usage: obj.forward(x) and returns: outs