code: def load_model(model, pretrained):
      weights = torch.load(pretrained)
      weights = weights["state_dict"]
  
      model_dict = model.state_dict()
  
      weights = {
          k.replace("module.", ""): v
          for k, v in weights.items()
          if k.replace("module.", "") in model_dict.keys()
          and "fc2" not in k
      }
      print(
          "==> len of weights to be loaded: {}. \n".format(len(weights))
      )
      model.load_state_dict(weights, strict=False)
      model.eval()
  
file_path: insightface/recognition/idmmd/evaluate/eval_buaa_112.py
imports: import numpy
  import os, sys
  import argparse
  import torch
  from PIL import Image
  from network.lightcnn112 import LightCNN_29Layers
  from evaluate import evaluate2
label_desc: Use image node_id 1 for calling a global function with example usage: load_model(model, pretrained) without return types