code: def MobileNetV1(pretrained=False, end_with="out", name=None):
      """Pre-trained MobileNetV1 model (static mode). Input shape [?, 224, 224, 3], value range [0, 1].
  
      Parameters
      ----------
      pretrained : boolean
          Whether to load pretrained weights. Default False.
      end_with : str
          The end point of the model [conv, depth1, depth2 ... depth13, globalmeanpool, out]. Default ``out`` i.e. the whole model.
      name : None or str
          Name for this model.
  
      Examples
      ---------
      Classify ImageNet classes, see `tutorial_models_mobilenetv1.py <https://github.com/tensorlayer/tensorlayer/blob/master/example/tutorial_models_mobilenetv1.py>`__
  
      >>> # get the whole model with pretrained weights
      >>> mobilenetv1 = tl.models.MobileNetV1(pretrained=True)
      >>> # use for inferencing
      >>> output = mobilenetv1(img1, is_train=False)
      >>> prob = tf.nn.softmax(output)[0].numpy()
  
      Extract features and Train a classifier with 100 classes
  
      >>> # get model without the last layer
      >>> cnn = tl.models.MobileNetV1(pretrained=True, end_with='reshape').as_layer()
      >>> # add one more layer and build new model
      >>> ni = Input([None, 224, 224, 3], name="inputs")
      >>> nn = cnn(ni)
      >>> nn = Conv2d(100, (1, 1), (1, 1), name='out')(nn)
      >>> nn = Flatten(name='flatten')(nn)
      >>> model = tl.models.Model(inputs=ni, outputs=nn)
      >>> # train your own classifier (only update the last layer)
      >>> train_params = model.get_layer('out').trainable_weights
  
      Returns
      -------
          static MobileNetV1.
      """
      ni = Input([None, 224, 224, 3], name="input")
  
      for i in range(len(layer_names)):
          if i == 0:
              n = conv_block(
                  ni, n_filters[i], strides=(2, 2), name=layer_names[i]
              )
          elif layer_names[i] in [
              "depth2",
              "depth4",
              "depth6",
              "depth12",
          ]:
              n = depthwise_conv_block(
                  n, n_filters[i], strides=(2, 2), name=layer_names[i]
              )
          elif layer_names[i] == "globalmeanpool":
              n = GlobalMeanPool2d(name="globalmeanpool")(n)
          elif layer_names[i] == "reshape":
              n = Reshape([-1, 1, 1, 1024], name="reshape")(n)
          elif layer_names[i] == "out":
              n = Conv2d(1000, (1, 1), (1, 1), name="out")(n)
              n = Flatten(name="flatten")(n)
          else:
              n = depthwise_conv_block(
                  n, n_filters[i], name=layer_names[i]
              )
  
          if layer_names[i] == end_with:
              break
  
      network = Model(inputs=ni, outputs=n, name=name)
  
      if pretrained:
          restore_params(network)
  
      return network
  
file_path: TensorLayer/tensorlayer/models/mobilenetv1.py
imports: import os
  import tensorflow
  from tensorlayer import logging
  from tensorlayer.files import assign_weights, load_npz, maybe_download_and_extract
  from tensorlayer.layers import BatchNorm, Conv2d, DepthwiseConv2d, Flatten, GlobalMeanPool2d, Input, Reshape
  from tensorlayer.models import Model
label_desc: Use image node_id 4 for calling a global function with example usage: MobileNetV1(pretrained, end_with, name) and returns: network