code: def MobileNetV2(
      im_height=224,
      im_width=224,
      num_classes=1000,
      alpha=1.0,
      round_nearest=8,
  ):
      block = InvertedResidual
      input_channel = _make_divisible(32 * alpha, round_nearest)
      last_channel = _make_divisible(1280 * alpha, round_nearest)
      inverted_residual_setting = [
          # t, c, n, s
          [1, 16, 1, 1],
          [6, 24, 2, 2],
          [6, 32, 3, 2],
          [6, 64, 4, 2],
          [6, 96, 3, 1],
          [6, 160, 3, 2],
          [6, 320, 1, 1],
      ]
  
      input_image = layers.Input(
          shape=(im_height, im_width, 3), dtype="float32"
      )
      # conv1
      x = ConvBNReLU(input_channel, stride=2, name="Conv")(input_image)
      # building inverted residual residual blockes
      for t, c, n, s in inverted_residual_setting:
          output_channel = _make_divisible(c * alpha, round_nearest)
          for i in range(n):
              stride = s if i == 0 else 1
              x = block(
                  x.shape[-1], output_channel, stride, expand_ratio=t
              )(x)
      # building last several layers
      x = ConvBNReLU(last_channel, kernel_size=1, name="Conv_1")(x)
  
      # building classifier
      x = layers.GlobalAveragePooling2D()(x)  # pool + flatten
      x = layers.Dropout(0.2)(x)
      output = layers.Dense(num_classes, name="Logits")(x)
  
      model = Model(inputs=input_image, outputs=output)
      return model
  
file_path: deep-learning-for-image-processing/tensorflow_classification/ConfusionMatrix/model.py
imports: from tensorflow.keras import layers, Model, Sequential
label_desc: Use image node_id 2 for calling a global function with example usage: MobileNetV2(im_height, im_width, num_classes, alpha, round_nearest) and returns: model