class_docstr: YOLOv3 spp object detection model
class_docstr_tok: ["YOLOv3","spp","object","detection","model"]
code: def __init__(self, cfg, img_size=(416, 416), verbose=False):
      super(Darknet, self).__init__()
      # 这里传入的img_size只在导出ONNX模型时起作用
      self.input_size = (
          [img_size] * 2 if isinstance(img_size, int) else img_size
      )
      # 解析网络对应的.cfg文件
      self.module_defs = parse_model_cfg(cfg)
      # 根据解析的网络结构一层一层去搭建
      self.module_list, self.routs = create_modules(
          self.module_defs, img_size
      )
      # 获取所有YOLOLayer层的索引
      self.yolo_layers = get_yolo_layers(self)
  
      # 打印下模型的信息，如果verbose为True则打印详细信息
      self.info(verbose) if not ONNX_EXPORT else None
  
file_path: deep-learning-for-image-processing/pytorch_object_detection/yolov3_spp/models.py
imports: from build_utils.layers import *
  from build_utils.parse_config import *
label_desc: Use image node_id 1 to create a new Darknet object from inherited base classes: nn with example: obj = Darknet(cfg, img_size, verbose)