class_docstr: Style MelGAN disciminator module.
docstr: Initilize StyleMelGANDiscriminator module.
  
  Args:
      repeats (int): Number of repititons to apply RWD.
      window_sizes (List[int]): List of random window sizes.
      pqmf_params (List[List[int]]): List of list of Parameters for PQMF modules
      discriminator_params (Dict[str, Any]): Parameters for base discriminator
          module.
      use_weight_nom (bool): Whether to apply weight normalization.
docstr_tok: ["Initilize","StyleMelGANDiscriminator","module",".","Args",":","repeats","(","int",")",":","Number","of","repititons","to","apply","RWD",".","window_sizes","(","List","[","int","]",")",":","List","of","random","window","sizes",".","pqmf_params","(","List","[","List","[","int","]","]",")",":","List","of","list","of","Parameters","for","PQMF","modules","discriminator_params","(","Dict","[","str",",","Any","]",")",":","Parameters","for","base","discriminator","module",".","use_weight_nom","(","bool",")",":","Whether","to","apply","weight","normalization","."]
code: def __init__(
      self,
      repeats: int = 2,
      window_sizes: List[int] = [512, 1024, 2048, 4096],
      pqmf_params: List[List[int]] = [
          [1, None, None, None],
          [2, 62, 0.26700, 9.0],
          [4, 62, 0.14200, 9.0],
          [8, 62, 0.07949, 9.0],
      ],
      discriminator_params: Dict[str, Any] = {
          "out_channels": 1,
          "kernel_sizes": [5, 3],
          "channels": 16,
          "max_downsample_channels": 512,
          "bias": True,
          "downsample_scales": [4, 4, 4, 1],
          "nonlinear_activation": "LeakyReLU",
          "nonlinear_activation_params": {"negative_slope": 0.2},
          "pad": "ReflectionPad1d",
          "pad_params": {},
      },
      use_weight_norm: bool = True,
  ):
      """Initilize StyleMelGANDiscriminator module.
  
      Args:
          repeats (int): Number of repititons to apply RWD.
          window_sizes (List[int]): List of random window sizes.
          pqmf_params (List[List[int]]): List of list of Parameters for PQMF modules
          discriminator_params (Dict[str, Any]): Parameters for base discriminator
              module.
          use_weight_nom (bool): Whether to apply weight normalization.
  
      """
      super().__init__()
  
      # window size check
      assert len(window_sizes) == len(pqmf_params)
      sizes = [ws // p[0] for ws, p in zip(window_sizes, pqmf_params)]
      assert len(window_sizes) == sum(
          [sizes[0] == size for size in sizes]
      )
  
      self.repeats = repeats
      self.window_sizes = window_sizes
      self.pqmfs = torch.nn.ModuleList()
      self.discriminators = torch.nn.ModuleList()
      for pqmf_param in pqmf_params:
          d_params = copy.deepcopy(discriminator_params)
          d_params["in_channels"] = pqmf_param[0]
          if pqmf_param[0] == 1:
              self.pqmfs += [torch.nn.Identity()]
          else:
              self.pqmfs += [PQMF(*pqmf_param)]
          self.discriminators += [BaseDiscriminator(**d_params)]
  
      # apply weight norm
      if use_weight_norm:
          self.apply_weight_norm()
  
      # reset parameters
      self.reset_parameters()
  
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 1 to create a new StyleMelGANDiscriminator object from inherited base classes: torch.nn with example: obj = StyleMelGANDiscriminator(repeats, window_sizes, pqmf_params, discriminator_params, use_weight_norm)