code: def __init__(
      self,
      n_bands,
      network_capacity=16,
      channels=1,
      fmap_max=512,
  ):
      super().__init__()
      num_layers = int(log2(n_bands) - 1)
      num_init_filters = channels
  
      blocks = []
      filters = [num_init_filters] + [
          (network_capacity * 4) * (2**i)
          for i in range(num_layers + 1)
      ]
  
      set_fmap_max = partial(min, fmap_max)
      filters = list(map(set_fmap_max, filters))
      chan_in_out = list(zip(filters[:-1], filters[1:]))
  
      blocks = []
  
      for ind, (in_chan, out_chan) in enumerate(chan_in_out):
          is_not_last = ind != (len(chan_in_out) - 1)
  
          block = DiscriminatorBlock(
              in_chan, out_chan, downsample=is_not_last
          )
          blocks.append(block)
  
      self.blocks = torch.nn.ModuleList(blocks)
  
      channel_last = filters[-1]
      latent_dim = channel_last
  
      self.final_conv = torch.nn.Conv2d(
          channel_last, channel_last, 3, padding=1
      )
      self.to_logit = torch.nn.Linear(latent_dim, 1)
  
      for m in self.modules():
          if isinstance(m, (torch.nn.Conv2d, torch.nn.Linear)):
              torch.nn.init.kaiming_normal_(
                  m.weight,
                  a=0,
                  mode="fan_in",
                  nonlinearity="leaky_relu",
              )
  
imports: import math
  from functools import partial
  from math import log2
  from typing import List
  import torch
  import torch.nn.functional
  from einops import rearrange
  from kornia.filters import filter2d
  from nemo.collections.tts.parts.utils.helpers import mask_sequence_tensor
label_desc: Use image node_id 1 to create a new Discriminator object from inherited base classes: torch.nn with example: obj = Discriminator(n_bands, network_capacity, channels, fmap_max)