code: def create_model(num_classes):
      # https://download.pytorch.org/models/resnet50-19c8e357.pth
      # pre_train_path = "./src/resnet50.pth"
      backbone = Backbone(pretrain_path=None)
      model = SSD300(backbone=backbone, num_classes=num_classes)
  
      pre_ssd_path = "./src/nvidia_ssdpyt_fp32.pt"
      pre_model_dict = torch.load(pre_ssd_path, map_location="cpu")
      pre_weights_dict = pre_model_dict["model"]
  
      # 删除类别预测器权重，注意，回归预测器的权重可以重用，因为不涉及num_classes
      del_conf_loc_dict = {}
      for k, v in pre_weights_dict.items():
          split_key = k.split(".")
          if "conf" in split_key:
              continue
          del_conf_loc_dict.update({k: v})
  
      missing_keys, unexpected_keys = model.load_state_dict(
          del_conf_loc_dict, strict=False
      )
      if len(missing_keys) != 0 or len(unexpected_keys) != 0:
          print("missing_keys: ", missing_keys)
          print("unexpected_keys: ", unexpected_keys)
  
      return model
  
file_path: deep-learning-for-image-processing/pytorch_object_detection/ssd/train_multi_GPU.py
imports: import time
  import os
  import datetime
  import torch
  import transforms
  from my_dataset import VOCDataSet
  from src import SSD300, Backbone
  import train_utils.train_eval_utils
  from train_utils import GroupedBatchSampler, create_aspect_ratio_groups, init_distributed_mode, save_on_master, mkdir
label_desc: Use image node_id 1 for calling a global function with example usage: create_model(num_classes) and returns: model