docstr: Head for YOLOv3 network
  
  Args:
      num_classes (int): number of foreground classes
      anchors (list): anchors
      anchor_masks (list): anchor masks
      loss (object): YOLOv3Loss instance
      iou_aware (bool): whether to use iou_aware
      iou_aware_factor (float): iou aware factor
      data_format (str): data format, NCHW or NHWC
docstr_tok: ["Head","for","YOLOv3","network","Args",":","num_classes","(","int",")",":","number","of","foreground","classes","anchors","(","list",")",":","anchors","anchor_masks","(","list",")",":","anchor","masks","loss","(","object",")",":","YOLOv3Loss","instance","iou_aware","(","bool",")",":","whether","to","use","iou_aware","iou_aware_factor","(","float",")",":","iou","aware","factor","data_format","(","str",")",":","data","format",",","NCHW","or","NHWC"]
code: def __init__(
      self,
      in_channels=[1024, 512, 256],
      anchors=[
          [10, 13],
          [16, 30],
          [33, 23],
          [30, 61],
          [62, 45],
          [59, 119],
          [116, 90],
          [156, 198],
          [373, 326],
      ],
      anchor_masks=[[6, 7, 8], [3, 4, 5], [0, 1, 2]],
      num_classes=80,
      loss="YOLOv3Loss",
      iou_aware=False,
      iou_aware_factor=0.4,
      data_format="NCHW",
  ):
      """
      Head for YOLOv3 network
  
      Args:
          num_classes (int): number of foreground classes
          anchors (list): anchors
          anchor_masks (list): anchor masks
          loss (object): YOLOv3Loss instance
          iou_aware (bool): whether to use iou_aware
          iou_aware_factor (float): iou aware factor
          data_format (str): data format, NCHW or NHWC
      """
      super(YOLOv3Head, self).__init__()
      assert len(in_channels) > 0, "in_channels length should > 0"
      self.in_channels = in_channels
      self.num_classes = num_classes
      self.loss = loss
  
      self.iou_aware = iou_aware
      self.iou_aware_factor = iou_aware_factor
  
      self.parse_anchor(anchors, anchor_masks)
      self.num_outputs = len(self.anchors)
      self.data_format = data_format
  
      self.yolo_outputs = []
      for i in range(len(self.anchors)):
          if self.iou_aware:
              num_filters = len(self.anchors[i]) * (
                  self.num_classes + 6
              )
          else:
              num_filters = len(self.anchors[i]) * (
                  self.num_classes + 5
              )
          name = "yolo_output.{}".format(i)
          conv = nn.Conv2D(
              in_channels=self.in_channels[i],
              out_channels=num_filters,
              kernel_size=1,
              stride=1,
              padding=0,
              data_format=data_format,
              bias_attr=ParamAttr(regularizer=L2Decay(0.0)),
          )
          conv.skip_quant = True
          yolo_output = self.add_sublayer(name, conv)
          self.yolo_outputs.append(yolo_output)
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddle import ParamAttr
  from paddle.regularizer import L2Decay
  from ppdet.core.workspace import register
  import math
  import numpy
  from ..initializer import bias_init_with_prob, constant_
  from ..backbones.csp_darknet import BaseConv, DWConv
  from ..losses import IouLoss
  from ppdet.modeling.assigners.simota_assigner import SimOTAAssigner
  from ppdet.modeling.bbox_utils import bbox_overlaps
  from ppdet.modeling.layers import MultiClassNMS
label_desc: Use image node_id 1 to create a new YOLOv3Head object from inherited base classes: nn with example: obj = YOLOv3Head(in_channels, anchors, anchor_masks, num_classes, loss, iou_aware, iou_aware_factor, data_format)