class_docstr: PWGAN generator as in https://arxiv.org/pdf/1910.11480.pdf.
  It is similar to WaveNet with no causal convolution.
      It is conditioned on an aux feature (spectrogram) to generate
  an output waveform from an input noise.
class_docstr_tok: ["PWGAN","generator","as","in","https",":","\/\/arxiv.org\/pdf\/1910.11480.pdf",".","It","is","similar","to","WaveNet","with","no","causal","convolution",".","It","is","conditioned","on","an","aux","feature","(","spectrogram",")","to","generate","an","output","waveform","from","an","input","noise","."]
docstr: c: (B, C ,T').
  o: Output tensor (B, out_channels, T)
docstr_tok: ["c",":","(","B",",","C",",","T","'",")",".","o",":","Output","tensor","(","B",",","out_channels",",","T",")"]
code: def forward(self, c):
      """
      c: (B, C ,T').
      o: Output tensor (B, out_channels, T)
      """
      # random noise
      x = torch.randn([c.shape[0], 1, c.shape[2] * self.upsample_scale])
      x = x.to(self.first_conv.bias.device)
  
      # perform upsampling
      if c is not None and self.upsample_net is not None:
          c = self.upsample_net(c)
          assert (
              c.shape[-1] == x.shape[-1]
          ), f" [!] Upsampling scale does not match the expected output. {c.shape} vs {x.shape}"
  
      # encode to hidden representation
      x = self.first_conv(x)
      skips = 0
      for f in self.conv_layers:
          x, h = f(x, 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
  
file_path: TTS/TTS/vocoder/models/parallel_wavegan_generator.py
imports: import math
  import numpy
  import torch
  from TTS.vocoder.layers.parallel_wavegan import ResidualBlock
  from TTS.vocoder.layers.upsample import ConvUpsample
label_desc: Use image node_id 2 for calling the ParallelWaveganGenerator obj's underlying member method code with example usage: obj.forward(c) and returns: x