code: def __init__(
      self,
      resblock,
      upsample_rates,
      upsample_kernel_sizes,
      upsample_initial_channel,
      resblock_kernel_sizes,
      resblock_dilation_sizes,
      initial_input_size=80,
      apply_weight_init_conv_pre=False,
  ):
      super().__init__()
      self.num_kernels = len(resblock_kernel_sizes)
      self.num_upsamples = len(upsample_rates)
      self.conv_pre = weight_norm(
          Conv1d(
              initial_input_size,
              upsample_initial_channel,
              7,
              1,
              padding=3,
          )
      )
      self.lrelu_slope = LRELU_SLOPE
      resblock = ResBlock1 if resblock == 1 else ResBlock2
  
      self.ups = nn.ModuleList()
      for i, (u, k) in enumerate(
          zip(upsample_rates, upsample_kernel_sizes)
      ):
          self.ups.append(
              weight_norm(
                  ConvTranspose1d(
                      upsample_initial_channel // (2**i),
                      upsample_initial_channel // (2 ** (i + 1)),
                      k,
                      u,
                      padding=(k - u) // 2,
                  )
              )
          )
  
      self.resblocks = nn.ModuleList()
      for i in range(len(self.ups)):
          resblock_list = nn.ModuleList()
          ch = upsample_initial_channel // (2 ** (i + 1))
          for j, (k, d) in enumerate(
              zip(resblock_kernel_sizes, resblock_dilation_sizes)
          ):
              resblock_list.append(resblock(ch, k, d))
          self.resblocks.append(resblock_list)
  
      self.conv_post = weight_norm(Conv1d(ch, 1, 7, 1, padding=3))
      self.ups.apply(init_weights)
      self.conv_post.apply(init_weights)
      if apply_weight_init_conv_pre:
          self.conv_pre.apply(init_weights)
  
imports: import torch
  import torch.nn
  import torch.nn.functional
  from torch.nn import AvgPool1d, Conv1d, Conv2d, ConvTranspose1d
  from torch.nn.utils import remove_weight_norm, spectral_norm, weight_norm
  from nemo.core.classes.common import typecheck
  from nemo.core.classes.module import NeuralModule
  from nemo.core.neural_types.elements import AudioSignal, MelSpectrogramType, VoidType
  from nemo.core.neural_types.neural_type import NeuralType
label_desc: Use image node_id 1 to create a new Generator object from inherited base classes: NeuralModule with example: obj = Generator(resblock, upsample_rates, upsample_kernel_sizes, upsample_initial_channel, resblock_kernel_sizes, resblock_dilation_sizes, initial_input_size, apply_weight_init_conv_pre)