class_docstr: Style MelGAN generator module.
docstr: Calculate forward propagation.
  
  Args:
      c (Tensor): Auxiliary input tensor (B, channels, T).
      z (Tensor): Input noise tensor (B, in_channels, 1).
  
  Returns:
      Tensor: Output tensor (B, out_channels, T ** prod(upsample_scales)).
docstr_tok: ["Calculate","forward","propagation",".","Args",":","c","(","Tensor",")",":","Auxiliary","input","tensor","(","B",",","channels",",","T",")",".","z","(","Tensor",")",":","Input","noise","tensor","(","B",",","in_channels",",","1",")",".","Returns",":","Tensor",":","Output","tensor","(","B",",","out_channels",",","T","*","*","prod","(","upsample_scales",")",")","."]
code: def forward(
      self, c: torch.Tensor, z: Optional[torch.Tensor] = None
  ) -> torch.Tensor:
      """Calculate forward propagation.
  
      Args:
          c (Tensor): Auxiliary input tensor (B, channels, T).
          z (Tensor): Input noise tensor (B, in_channels, 1).
  
      Returns:
          Tensor: Output tensor (B, out_channels, T ** prod(upsample_scales)).
  
      """
      if z is None:
          z = torch.randn(c.size(0), self.in_channels, 1).to(
              device=c.device,
              dtype=c.dtype,
          )
      x = self.noise_upsample(z)
      for block in self.blocks:
          x, c = block(x, c)
      x = self.output_conv(x)
      return x
  
imports: import copy
  import logging
  import math
  from typing import Any, Dict, List, Optional
  import numpy
  import torch
  import torch.nn.functional
  from espnet2.gan_tts.melgan import MelGANDiscriminator
  from espnet2.gan_tts.melgan.pqmf import PQMF
  from espnet2.gan_tts.style_melgan.tade_res_block import TADEResBlock
label_desc: Use image node_id 2 for calling the StyleMelGANGenerator obj's underlying member method code with example usage: obj.forward(c, z) and returns: x