code: def __init__(
      self,
      in_channels,
      out_channels,
      use_bn=True,
      act_func="relu",
      dropout_rate=0,
      ops_order="weight_bn_act",
  ):
      super(Base2DLayer, self).__init__()
      self.in_channels = in_channels
      self.out_channels = out_channels
  
      self.use_bn = use_bn
      self.act_func = act_func
      self.dropout_rate = dropout_rate
      self.ops_order = ops_order
  
      """ modules """
      modules = {}
      # batch norm
      if self.use_bn:
          if self.bn_before_weight:
              modules["bn"] = nn.BatchNorm2d(in_channels)
          else:
              modules["bn"] = nn.BatchNorm2d(out_channels)
      else:
          modules["bn"] = None
      # activation
      modules["act"] = build_activation(
          self.act_func, self.ops_list[0] != "act"
      )
      # dropout
      if self.dropout_rate > 0:
          modules["dropout"] = nn.Dropout2d(
              self.dropout_rate, inplace=True
          )
      else:
          modules["dropout"] = None
      # weight
      modules["weight"] = self.weight_op()
  
      # add modules
      for op in self.ops_list:
          if modules[op] is None:
              continue
          elif op == "weight":
              if modules["dropout"] is not None:
                  self.add_module("dropout", modules["dropout"])
              for key in modules["weight"]:
                  self.add_module(key, modules["weight"][key])
          else:
              self.add_module(op, modules[op])
      self.sequence = nn.Sequential(self._modules)
  
imports: from collections import OrderedDict
  from nni.retiarii.serializer import basic_unit
  import torch
  import nni.retiarii.nn.pytorch
  from putils import get_same_padding, build_activation
label_desc: Use image node_id 1 to create a new Base2DLayer object from inherited base classes: nn with example: obj = Base2DLayer(in_channels, out_channels, use_bn, act_func, dropout_rate, ops_order)