code: def mobilenet_v3_small(
      input_shape=(224, 224, 3),
      num_classes=1000,
      alpha=1.0,
      include_top=True,
  ):
      """
      download weights url:
      链接: https://pan.baidu.com/s/1vrQ_6HdDTHL1UUAN6nSEcw  密码: rrf0
      """
      bn = partial(
          layers.BatchNormalization, epsilon=0.001, momentum=0.99
      )
      img_input = layers.Input(shape=input_shape)
  
      x = layers.Conv2D(
          filters=16,
          kernel_size=3,
          strides=(2, 2),
          padding="same",
          use_bias=False,
          name="Conv",
      )(img_input)
      x = bn(name="Conv/BatchNorm")(x)
      x = HardSwish(name="Conv/HardSwish")(x)
  
      inverted_cnf = partial(_inverted_res_block, alpha=alpha)
      # input, input_c, k_size, expand_c, use_se, activation, stride, block_id
      x = inverted_cnf(x, 16, 3, 16, 16, True, "RE", 2, 0)
      x = inverted_cnf(x, 16, 3, 72, 24, False, "RE", 2, 1)
      x = inverted_cnf(x, 24, 3, 88, 24, False, "RE", 1, 2)
      x = inverted_cnf(x, 24, 5, 96, 40, True, "HS", 2, 3)
      x = inverted_cnf(x, 40, 5, 240, 40, True, "HS", 1, 4)
      x = inverted_cnf(x, 40, 5, 240, 40, True, "HS", 1, 5)
      x = inverted_cnf(x, 40, 5, 120, 48, True, "HS", 1, 6)
      x = inverted_cnf(x, 48, 5, 144, 48, True, "HS", 1, 7)
      x = inverted_cnf(x, 48, 5, 288, 96, True, "HS", 2, 8)
      x = inverted_cnf(x, 96, 5, 576, 96, True, "HS", 1, 9)
      x = inverted_cnf(x, 96, 5, 576, 96, True, "HS", 1, 10)
  
      last_c = _make_divisible(96 * 6 * alpha)
      last_point_c = _make_divisible(1024 * alpha)
  
      x = layers.Conv2D(
          filters=last_c,
          kernel_size=1,
          padding="same",
          use_bias=False,
          name="Conv_1",
      )(x)
      x = bn(name="Conv_1/BatchNorm")(x)
      x = HardSwish(name="Conv_1/HardSwish")(x)
  
      if include_top is True:
          x = layers.GlobalAveragePooling2D()(x)
          x = layers.Reshape((1, 1, last_c))(x)
  
          # fc1
          x = layers.Conv2D(
              filters=last_point_c,
              kernel_size=1,
              padding="same",
              name="Conv_2",
          )(x)
          x = HardSwish(name="Conv_2/HardSwish")(x)
  
          # fc2
          x = layers.Conv2D(
              filters=num_classes,
              kernel_size=1,
              padding="same",
              name="Logits/Conv2d_1c_1x1",
          )(x)
          x = layers.Flatten()(x)
          x = layers.Softmax(name="Predictions")(x)
  
      model = Model(img_input, x, name="MobilenetV3large")
  
      return model
  
file_path: deep-learning-for-image-processing/tensorflow_classification/Test6_mobilenet/model_v3.py
imports: from typing import Union
  from functools import partial
  from tensorflow.keras import layers, Model
label_desc: Use image node_id 6 for calling a global function with example usage: mobilenet_v3_small(input_shape, num_classes, alpha, include_top) and returns: model