class_docstr: Parallel WaveGAN Generator module.
docstr: Calculate forward propagation.
  
  Args:
      c (Tensor): Local conditioning auxiliary features (B, C ,T_feats).
      z (Tensor): Input noise signal (B, 1, T_wav).
  
  Returns:
      Tensor: Output tensor (B, out_channels, T_wav)
docstr_tok: ["Calculate","forward","propagation",".","Args",":","c","(","Tensor",")",":","Local","conditioning","auxiliary","features","(","B",",","C",",","T_feats",")",".","z","(","Tensor",")",":","Input","noise","signal","(","B",",","1",",","T_wav",")",".","Returns",":","Tensor",":","Output","tensor","(","B",",","out_channels",",","T_wav",")"]
code: def forward(
      self, c: torch.Tensor, z: Optional[torch.Tensor] = None
  ) -> torch.Tensor:
      """Calculate forward propagation.
  
      Args:
          c (Tensor): Local conditioning auxiliary features (B, C ,T_feats).
          z (Tensor): Input noise signal (B, 1, T_wav).
  
      Returns:
          Tensor: Output tensor (B, out_channels, T_wav)
  
      """
      if z is None:
          b, _, t = c.size()
          z = torch.randn(b, 1, t * self.upsample_factor).to(
              device=c.device, dtype=c.dtype
          )
  
      # perform upsampling
      if self.upsample_net is not None:
          c = self.upsample_net(c)
          assert c.size(-1) == z.size(-1)
  
      # encode to hidden representation
      x = self.first_conv(z)
      skips = 0
      for f in self.conv_layers:
          x, h = f(x=x, x_mask=None, c=c)
          skips += h
      skips *= math.sqrt(1.0 / len(self.conv_layers))
  
      # apply final layers
      x = skips
      for f in self.last_conv_layers:
          x = f(x)
  
      return x
  
imports: import logging
  import math
  from typing import Any, Dict, Optional
  import numpy
  import torch
  from espnet2.gan_tts.parallel_wavegan import upsample
  from espnet2.gan_tts.wavenet.residual_block import Conv1d, Conv1d1x1, ResidualBlock
label_desc: Use image node_id 2 for calling the ParallelWaveGANGenerator obj's underlying member method code with example usage: obj.forward(c, z) and returns: x