code: def loadModel(
      url="https://github.com/serengil/deepface_models/releases/download/v1.0/vgg_face_weights.h5",
  ) -> Model:
      model = baseModel()
  
      home = functions.get_deepface_home()
      output = home + "/.deepface/weights/vgg_face_weights.h5"
  
      if os.path.isfile(output) != True:
          logger.info("vgg_face_weights.h5 will be downloaded...")
          gdown.download(url, output, quiet=False)
  
      model.load_weights(output)
  
      # 2622d dimensional model
      # vgg_face_descriptor = Model(inputs=model.layers[0].input, outputs=model.layers[-2].output)
  
      # 4096 dimensional model offers 6% to 14% increasement on accuracy!
      # - softmax causes underfitting
      # - added normalization layer to avoid underfitting with euclidean
      # as described here: https://github.com/serengil/deepface/issues/944
      base_model_output = Sequential()
      base_model_output = Flatten()(model.layers[-5].output)
      base_model_output = Lambda(
          lambda x: K.l2_normalize(x, axis=1), name="norm_layer"
      )(base_model_output)
      vgg_face_descriptor = Model(
          inputs=model.input, outputs=base_model_output
      )
  
      return vgg_face_descriptor
  
imports: import os
  import gdown
  import tensorflow
  from deepface.commons import functions
  from deepface.commons.logger import Logger
label_desc: Use image node_id 2 for calling a global function with example usage: loadModel(url) and returns: vgg_face_descriptor