class_docstr: YOLOv3 spp object detection model
class_docstr_tok: ["YOLOv3","spp","object","detection","model"]
code: def forward_once(self, x, verbose=False):
      # yolo_out收集每个yolo_layer层的输出
      # out收集每个模块的输出
      yolo_out, out = [], []
      if verbose:
          print("0", x.shape)
          str = ""
  
      for i, module in enumerate(self.module_list):
          name = module.__class__.__name__
          if name in [
              "WeightedFeatureFusion",
              "FeatureConcat",
          ]:  # sum, concat
              if verbose:
                  l = [i - 1] + module.layers  # layers
                  sh = [list(x.shape)] + [
                      list(out[i].shape) for i in module.layers
                  ]  # shapes
                  str = " >> " + " + ".join(
                      ["layer %g %s" % x for x in zip(l, sh)]
                  )
              x = module(
                  x, out
              )  # WeightedFeatureFusion(), FeatureConcat()
          elif name == "YOLOLayer":
              yolo_out.append(module(x))
          else:  # run module directly, i.e. mtype = 'convolutional', 'upsample', 'maxpool', 'batchnorm2d' etc.
              x = module(x)
  
          out.append(x if self.routs[i] else [])
          if verbose:
              print(
                  "%g/%g %s -" % (i, len(self.module_list), name),
                  list(x.shape),
                  str,
              )
              str = ""
  
      if self.training:  # train
          return yolo_out
      elif ONNX_EXPORT:  # export
          # x = [torch.cat(x, 0) for x in zip(*yolo_out)]
          # return x[0], torch.cat(x[1:3], 1)  # scores, boxes: 3780x80, 3780x4
          p = torch.cat(yolo_out, dim=0)
  
          # # 根据objectness虑除低概率目标
          # mask = torch.nonzero(torch.gt(p[:, 4], 0.1), as_tuple=False).squeeze(1)
          # # onnx不支持超过一维的索引（pytorch太灵活了）
          # # p = p[mask]
          # p = torch.index_select(p, dim=0, index=mask)
          #
          # # 虑除小面积目标，w > 2 and h > 2 pixel
          # # ONNX暂不支持bitwise_and和all操作
          # mask_s = torch.gt(p[:, 2], 2./self.input_size[0]) & torch.gt(p[:, 3], 2./self.input_size[1])
          # mask_s = torch.nonzero(mask_s, as_tuple=False).squeeze(1)
          # p = torch.index_select(p, dim=0, index=mask_s)  # width-height 虑除小目标
          #
          # if mask_s.numel() == 0:
          #     return torch.empty([0, 85])
  
          return p
      else:  # inference or test
          x, p = zip(*yolo_out)  # inference output, training output
          x = torch.cat(x, 1)  # cat yolo outputs
  
          return x, p
  
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 3 for calling the Darknet obj's underlying member method code with example usage: obj.forward_once(x, verbose) and returns: yolo_out, p, x,  p