code: def __init__(
      self,
      n_class=1000,
      input_size=224,
      dropout=0.8,
      mode="small",
      width_mult=1.0,
  ):
      super(MobileNetV3, self).__init__()
      input_channel = 16
      last_channel = 1280
      if mode == "large":
          # refer to Table 1 in paper
          mobile_setting = [
              # k, exp, c,  se,     nl,  s,
              [3, 16, 16, False, "RE", 1],
              [3, 64, 24, False, "RE", 2],
              [3, 72, 24, False, "RE", 1],  # 3
              [5, 72, 40, True, "RE", 2],
              [5, 120, 40, True, "RE", 1],
              [5, 120, 40, True, "RE", 1],  # 6
              [3, 240, 80, False, "HS", 2],
              [3, 200, 80, False, "HS", 1],
              [3, 184, 80, False, "HS", 1],
              [3, 184, 80, False, "HS", 1],
              [3, 480, 112, True, "HS", 1],
              [3, 672, 112, True, "HS", 1],  # 12
              [5, 672, 160, True, "HS", 2],
              [5, 960, 160, True, "HS", 1],
              [5, 960, 160, True, "HS", 1],
          ]
      elif mode == "small":
          # refer to Table 2 in paper
          mobile_setting = [
              # k, exp, c,  se,     nl,  s,
              [3, 16, 16, True, "RE", 2],
              [3, 72, 24, False, "RE", 2],
              [3, 88, 24, False, "RE", 1],
              [5, 96, 40, True, "HS", 2],
              [5, 240, 40, True, "HS", 1],
              [5, 240, 40, True, "HS", 1],
              [5, 120, 48, True, "HS", 1],
              [5, 144, 48, True, "HS", 1],
              [5, 288, 96, True, "HS", 2],
              [5, 576, 96, True, "HS", 1],
              [5, 576, 96, True, "HS", 1],
          ]
      else:
          raise NotImplementedError
  
      # building first layer
      assert input_size % 32 == 0
      last_channel = (
          make_divisible(last_channel * width_mult)
          if width_mult > 1.0
          else last_channel
      )
      self.features = nn.ModuleList(
          [conv_bn(3, input_channel, 2, nlin_layer=Hswish)]
      )  # start_idx = 0: Input type (torch.cuda.FloatTensor) and weight type (torch.FloatTensor) should be the same
      self.classifier = []
  
      # building mobile blocks
      for k, exp, c, se, nl, s in mobile_setting:
          output_channel = make_divisible(c * width_mult)
          exp_channel = make_divisible(exp * width_mult)
          self.features.append(
              MobileBottleneck(
                  input_channel,
                  output_channel,
                  k,
                  s,
                  exp_channel,
                  se,
                  nl,
              )
          )
          input_channel = output_channel
  
      # building last several layers
      if mode == "large":
          last_conv = make_divisible(960 * width_mult)
          self.features.append(
              conv_1x1_bn(input_channel, last_conv, nlin_layer=Hswish)
          )  # 16
          self.features.append(nn.AdaptiveAvgPool2d(1))
          self.features.append(
              nn.Conv2d(last_conv, last_channel, 1, 1, 0)
          )
          self.features.append(Hswish(inplace=True))
      elif mode == "small":
          last_conv = make_divisible(576 * width_mult)
          self.features.append(
              conv_1x1_bn(input_channel, last_conv, nlin_layer=Hswish)
          )
          # self.features.append(SEModule(last_conv))  # refer to paper Table2, but I think this is a mistake
          self.features.append(nn.AdaptiveAvgPool2d(1))
          self.features.append(
              nn.Conv2d(last_conv, last_channel, 1, 1, 0)
          )
          self.features.append(Hswish(inplace=True))
      else:
          raise NotImplementedError
  
      # make it nn.Sequential
      # self.features = nn.Sequential(*self.features)  del for dbnet
  
      # building classifier
      self.classifier = nn.Sequential(
          nn.Dropout(p=dropout),  # refer to paper section 6
          nn.Linear(last_channel, n_class),
      )
  
      self._initialize_weights()
  
imports: import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 1 to create a new MobileNetV3 object from inherited base classes: nn with example: obj = MobileNetV3(n_class, input_size, dropout, mode, width_mult)