code: def SqueezeNetV1(pretrained=False, end_with="out", name=None):
      """Pre-trained SqueezeNetV1 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 [conv1, maxpool1, fire2, fire3, fire4, ..., out]. Default ``out`` i.e. the whole model.
      name : None or str
          Name for this model.
  
      Examples
      ---------
      Classify ImageNet classes, see `tutorial_models_squeezenetv1.py <https://github.com/tensorlayer/tensorlayer/blob/master/example/tutorial_models_squeezenetv1.py>`__
  
      >>> # get the whole model
      >>> squeezenet = tl.models.SqueezeNetV1(pretrained=True)
      >>> # use for inferencing
      >>> output = squeezenet(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.SqueezeNetV1(pretrained=True, end_with='drop1').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), padding='VALID', name='conv10')(nn)
      >>> nn = GlobalMeanPool2d(name='globalmeanpool')(nn)
      >>> model = tl.models.Model(inputs=ni, outputs=nn)
      >>> # train your own classifier (only update the last layer)
      >>> train_params = model.get_layer('conv10').trainable_weights
  
      Returns
      -------
          static SqueezeNetV1.
  
      """
      ni = Input([None, 224, 224, 3], name="input")
      n = Lambda(lambda x: x * 255, name="scale")(ni)
  
      for i in range(len(layer_names)):
          if layer_names[i] == "conv1":
              n = Conv2d(
                  64, (3, 3), (2, 2), tf.nn.relu, "SAME", name="conv1"
              )(n)
          elif layer_names[i] == "maxpool1":
              n = MaxPool2d((3, 3), (2, 2), "VALID", name="maxpool1")(n)
          elif layer_names[i] == "drop1":
              n = Dropout(keep=0.5, name="drop1")(n)
          elif layer_names[i] == "out":
              n = Conv2d(
                  1000, (1, 1), (1, 1), padding="VALID", name="conv10"
              )(
                  n
              )  # 13, 13, 1000
              n = GlobalMeanPool2d(name="globalmeanpool")(n)
          elif layer_names[i] in ["fire3", "fire5"]:
              n = fire_block(
                  n,
                  n_filters[i - 2],
                  max_pool=True,
                  name=layer_names[i],
              )
          else:
              n = fire_block(
                  n,
                  n_filters[i - 2],
                  max_pool=False,
                  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/squeezenetv1.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 Concat, Conv2d, Dropout, GlobalMeanPool2d, Input, Lambda, MaxPool2d
  from tensorlayer.models import Model
label_desc: Use image node_id 3 for calling a global function with example usage: SqueezeNetV1(pretrained, end_with, name) and returns: network