code: def __init__(
      self,
      num_layers=12,
      out_filters=24,
      in_channels=3,
      num_classes=10,
      dropout_rate=0.0,
  ):
      super().__init__()
      self.num_layers = num_layers
      self.num_classes = num_classes
      self.out_filters = out_filters
  
      self.stem = nn.Sequential(
          nn.Conv2d(in_channels, out_filters, 3, 1, 1, bias=False),
          nn.BatchNorm2d(out_filters),
      )
  
      pool_distance = self.num_layers // 3
      self.pool_layers_idx = [pool_distance - 1, 2 * pool_distance - 1]
      self.dropout_rate = dropout_rate
      self.dropout = nn.Dropout(self.dropout_rate)
  
      self.layers = nn.ModuleList()
      self.pool_layers = nn.ModuleList()
      labels = []
      for layer_id in range(self.num_layers):
          labels.append("layer_{}".format(layer_id))
          if layer_id in self.pool_layers_idx:
              self.pool_layers.append(
                  FactorizedReduce(self.out_filters, self.out_filters)
              )
          self.layers.append(
              ENASLayer(
                  labels[-1],
                  labels[:-1],
                  self.out_filters,
                  self.out_filters,
              )
          )
  
      self.gap = nn.AdaptiveAvgPool2d(1)
      self.dense = nn.Linear(self.out_filters, self.num_classes)
  
file_path: nni/examples/nas/legacy/oneshot/enas/macro.py
imports: import torch.nn
  from nni.nas.pytorch import mutables
  from ops import FactorizedReduce, ConvBranch, PoolBranch
label_desc: Use image node_id 1 to create a new GeneralNetwork object from inherited base classes: nn with example: obj = GeneralNetwork(num_layers, out_filters, in_channels, num_classes, dropout_rate)