code: def __init__(
      self,
      block_args,
      num_classes=1000,
      in_chans=3,
      stem_size=16,
      num_features=1280,
      head_bias=True,
      channel_multiplier=1.0,
      pad_type="",
      act_layer=nn.ReLU,
      drop_rate=0.0,
      drop_path_rate=0.0,
      se_kwargs=None,
      norm_layer=nn.BatchNorm2d,
      norm_kwargs=None,
      global_pool="avg",
      logger=None,
      verbose=False,
  ):
      super(ChildNet, self).__init__()
  
      self.num_classes = num_classes
      self.num_features = num_features
      self.drop_rate = drop_rate
      self._in_chs = in_chans
      self.logger = logger
  
      # Stem
      stem_size = round_channels(stem_size, channel_multiplier)
      self.conv_stem = create_conv2d(
          self._in_chs, stem_size, 3, stride=2, padding=pad_type
      )
      self.bn1 = norm_layer(stem_size, **norm_kwargs)
      self.act1 = act_layer(inplace=True)
      self._in_chs = stem_size
  
      # Middle stages (IR/ER/DS Blocks)
      builder = ChildNetBuilder(
          channel_multiplier,
          8,
          None,
          32,
          pad_type,
          act_layer,
          se_kwargs,
          norm_layer,
          norm_kwargs,
          drop_path_rate,
          verbose=verbose,
      )
      self.blocks = nn.Sequential(*builder(self._in_chs, block_args))
      # self.blocks = builder(self._in_chs, block_args)
      self._in_chs = builder.in_chs
  
      # Head + Pooling
      self.global_pool = SelectAdaptivePool2d(pool_type=global_pool)
      self.conv_head = create_conv2d(
          self._in_chs,
          self.num_features,
          1,
          padding=pad_type,
          bias=head_bias,
      )
      self.act2 = act_layer(inplace=True)
  
      # Classifier
      self.classifier = nn.Linear(
          self.num_features * self.global_pool.feat_mult(),
          self.num_classes,
      )
  
      efficientnet_init_weights(self)
  
file_path: nni/examples/nas/legacy/cream/lib/models/structures/childnet.py
imports: from lib.utils.builder_util import *
  from lib.models.builders.build_childnet import *
  from timm.models.layers import SelectAdaptivePool2d
  from timm.models.layers.activations import hard_sigmoid
label_desc: Use image node_id 1 to create a new ChildNet object from inherited base classes: nn with example: obj = ChildNet(block_args, num_classes, in_chans, stem_size, num_features, head_bias, channel_multiplier, pad_type, act_layer, drop_rate, drop_path_rate, se_kwargs, norm_layer, norm_kwargs, global_pool, logger, verbose)