code: def __init__(
      self,
      in_channels=None,
      out_channels=None,
      stride=1,
      shortcut=None,
      nmasks=None,
      train_masks=False,
      level=None,
      use_act=False,
      filter_size=None,
      act=None,
      unique_masks=False,
      noise_type=None,
      input_size=None,
      pool_type=None,
      mix_maps=None,
  ):
      super(PerturbBasicBlock, self).__init__()
      self.shortcut = shortcut
      if pool_type == "max":
          pool = nn.MaxPool2d
      elif pool_type == "avg":
          pool = nn.AvgPool2d
      else:
          print(
              "\n\nPool Type {} is not supported/understood\n\n".format(
                  pool_type
              )
          )
          return
      self.layers = nn.Sequential(
          PerturbLayer(
              in_channels=in_channels,
              out_channels=out_channels,
              nmasks=nmasks,
              input_size=input_size,
              level=level,
              filter_size=filter_size,
              use_act=use_act,
              train_masks=train_masks,
              act=act,
              unique_masks=unique_masks,
              noise_type=noise_type,
              mix_maps=mix_maps,
          ),
          pool(stride, stride),
          PerturbLayer(
              in_channels=out_channels,
              out_channels=out_channels,
              nmasks=nmasks,
              input_size=input_size // stride,
              level=level,
              filter_size=filter_size,
              use_act=use_act,
              train_masks=train_masks,
              act=act,
              unique_masks=unique_masks,
              noise_type=noise_type,
              mix_maps=mix_maps,
          ),
      )
  
imports: import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 1 to create a new PerturbBasicBlock object from inherited base classes: nn with example: obj = PerturbBasicBlock(in_channels, out_channels, stride, shortcut, nmasks, train_masks, level, use_act, filter_size, act, unique_masks, noise_type, input_size, pool_type, mix_maps)