code: def __init__(
      self,
      input_size=224,
      first_conv_channels=16,
      last_conv_channels=1024,
      n_classes=1000,
      affine=False,
  ):
      super().__init__()
  
      assert input_size % 32 == 0
      self.stage_blocks = [4, 4, 8, 4]
      self.stage_channels = [64, 160, 320, 640]
      self._input_size = input_size
      self._feature_map_size = input_size
      self._first_conv_channels = first_conv_channels
      self._last_conv_channels = last_conv_channels
      self._n_classes = n_classes
      self._affine = affine
      self._layerchoice_count = 0
  
      # building first layer
      self.first_conv = nn.Sequential(
          nn.Conv2d(3, first_conv_channels, 3, 2, 1, bias=False),
          nn.BatchNorm2d(first_conv_channels, affine=affine),
          nn.ReLU(inplace=True),
      )
      self._feature_map_size //= 2
  
      p_channels = first_conv_channels
      features = []
      for num_blocks, channels in zip(
          self.stage_blocks, self.stage_channels
      ):
          features.extend(
              self._make_blocks(num_blocks, p_channels, channels)
          )
          p_channels = channels
      self.features = nn.Sequential(*features)
  
      self.conv_last = nn.Sequential(
          nn.Conv2d(
              p_channels, last_conv_channels, 1, 1, 0, bias=False
          ),
          nn.BatchNorm2d(last_conv_channels, affine=affine),
          nn.ReLU(inplace=True),
      )
      self.globalpool = nn.AvgPool2d(self._feature_map_size)
      self.dropout = nn.Dropout(0.1)
      self.classifier = nn.Sequential(
          nn.Linear(last_conv_channels, n_classes, bias=False),
      )
  
      self._initialize_weights()
  
file_path: nni/examples/nas/legacy/oneshot/spos/network.py
imports: import os
  import pickle
  import re
  import torch
  import nni.retiarii.nn.pytorch
  from nni.retiarii.nn.pytorch import LayerChoice
  from nni.retiarii.serializer import model_wrapper
  from blocks import ShuffleNetBlock, ShuffleXceptionBlock
label_desc: Use image node_id 1 to create a new ShuffleNetV2OneShot object from inherited base classes: nn with example: obj = ShuffleNetV2OneShot(input_size, first_conv_channels, last_conv_channels, n_classes, affine)