class_docstr: YOLOV3Head Paper link: https://arxiv.org/abs/1804.02767.
  
  Args:
      num_classes (int): The number of object classes (w/o background)
      in_channels (List[int]): Number of input channels per scale.
      out_channels (List[int]): The number of output channels per scale
          before the final 1x1 layer. Default: (1024, 512, 256).
      anchor_generator (dict): Config dict for anchor generator
      bbox_coder (dict): Config of bounding box coder.
      featmap_strides (List[int]): The stride of each scale.
          Should be in descending order. Default: (32, 16, 8).
      one_hot_smoother (float): Set a non-zero value to enable label-smooth
          Default: 0.
      conv_cfg (dict): Config dict for convolution layer. Default: None.
      norm_cfg (dict): Dictionary to construct and config norm layer.
          Default: dict(type='BN', requires_grad=True)
      act_cfg (dict): Config dict for activation layer.
          Default: dict(type='LeakyReLU', negative_slope=0.1).
      loss_cls (dict): Config of classification loss.
      loss_conf (dict): Config of confidence loss.
      loss_xy (dict): Config of xy coordinate loss.
      loss_wh (dict): Config of wh coordinate loss.
      train_cfg (dict): Training config of YOLOV3 head. Default: None.
      test_cfg (dict): Testing config of YOLOV3 head. Default: None.
class_docstr_tok: ["YOLOV3Head","Paper","link",":","https",":","\/\/arxiv.org\/abs\/1804.02767",".","Args",":","num_classes","(","int",")",":","The","number","of","object","classes","(","w\/o","background",")","in_channels","(","List","[","int","]",")",":","Number","of","input","channels","per","scale",".","out_channels","(","List","[","int","]",")",":","The","number","of","output","channels","per","scale","before","the","final","1x1","layer",".","Default",":","(","1024",",","512",",","256",")",".","anchor_generator","(","dict",")",":","Config","dict","for","anchor","generator","bbox_coder","(","dict",")",":","Config","of","bounding","box","coder",".","featmap_strides","(","List","[","int","]",")",":","The","stride","of","each","scale",".","Should","be","in","descending","order",".","Default",":","(","32",",","16",",","8",")",".","one_hot_smoother","(","float",")",":","Set","a","non-zero","value","to","enable","label-smooth","Default",":","0.","conv_cfg","(","dict",")",":","Config","dict","for","convolution","layer",".","Default",":","None",".","norm_cfg","(","dict",")",":","Dictionary","to","construct","and","config","norm","layer",".","Default",":","dict","(","type='BN","'",",","requires_grad=True",")","act_cfg","(","dict",")",":","Config","dict","for","activation","layer",".","Default",":","dict","(","type='LeakyReLU","'",",","negative_slope=0.1",")",".","loss_cls","(","dict",")",":","Config","of","classification","loss",".","loss_conf","(","dict",")",":","Config","of","confidence","loss",".","loss_xy","(","dict",")",":","Config","of","xy","coordinate","loss",".","loss_wh","(","dict",")",":","Config","of","wh","coordinate","loss",".","train_cfg","(","dict",")",":","Training","config","of","YOLOV3","head",".","Default",":","None",".","test_cfg","(","dict",")",":","Testing","config","of","YOLOV3","head",".","Default",":","None","."]
docstr: Compute target maps for anchors in multiple images.
  
  Args:
      anchor_list (list[list[Tensor]]): Multi level anchors of each
          image. The outer list indicates images, and the inner list
          corresponds to feature levels of the image. Each element of
          the inner list is a tensor of shape (num_total_anchors, 4).
      responsible_flag_list (list[list[Tensor]]): Multi level responsible
          flags of each image. Each element is a tensor of shape
          (num_total_anchors, )
      gt_bboxes_list (list[Tensor]): Ground truth bboxes of each image.
      gt_labels_list (list[Tensor]): Ground truth labels of each box.
  
  Returns:
      tuple: Usually returns a tuple containing learning targets.
          - target_map_list (list[Tensor]): Target map of each level.
          - neg_map_list (list[Tensor]): Negative map of each level.
docstr_tok: ["Compute","target","maps","for","anchors","in","multiple","images",".","Args",":","anchor_list","(","list","[","list","[","Tensor","]","]",")",":","Multi","level","anchors","of","each","image",".","The","outer","list","indicates","images",",","and","the","inner","list","corresponds","to","feature","levels","of","the","image",".","Each","element","of","the","inner","list","is","a","tensor","of","shape","(","num_total_anchors",",","4",")",".","responsible_flag_list","(","list","[","list","[","Tensor","]","]",")",":","Multi","level","responsible","flags","of","each","image",".","Each","element","is","a","tensor","of","shape","(","num_total_anchors",",",")","gt_bboxes_list","(","list","[","Tensor","]",")",":","Ground","truth","bboxes","of","each","image",".","gt_labels_list","(","list","[","Tensor","]",")",":","Ground","truth","labels","of","each","box",".","Returns",":","tuple",":","Usually","returns","a","tuple","containing","learning","targets",".","-","target_map_list","(","list","[","Tensor","]",")",":","Target","map","of","each","level",".","-","neg_map_list","(","list","[","Tensor","]",")",":","Negative","map","of","each","level","."]
code: def get_targets(
      self,
      anchor_list,
      responsible_flag_list,
      gt_bboxes_list,
      gt_labels_list,
  ):
      """Compute target maps for anchors in multiple images.
  
      Args:
          anchor_list (list[list[Tensor]]): Multi level anchors of each
              image. The outer list indicates images, and the inner list
              corresponds to feature levels of the image. Each element of
              the inner list is a tensor of shape (num_total_anchors, 4).
          responsible_flag_list (list[list[Tensor]]): Multi level responsible
              flags of each image. Each element is a tensor of shape
              (num_total_anchors, )
          gt_bboxes_list (list[Tensor]): Ground truth bboxes of each image.
          gt_labels_list (list[Tensor]): Ground truth labels of each box.
  
      Returns:
          tuple: Usually returns a tuple containing learning targets.
              - target_map_list (list[Tensor]): Target map of each level.
              - neg_map_list (list[Tensor]): Negative map of each level.
      """
      num_imgs = len(anchor_list)
  
      # anchor number of multi levels
      num_level_anchors = [
          anchors.size(0) for anchors in anchor_list[0]
      ]
  
      results = multi_apply(
          self._get_targets_single,
          anchor_list,
          responsible_flag_list,
          gt_bboxes_list,
          gt_labels_list,
      )
  
      all_target_maps, all_neg_maps = results
      assert num_imgs == len(all_target_maps) == len(all_neg_maps)
      target_maps_list = images_to_levels(
          all_target_maps, num_level_anchors
      )
      neg_maps_list = images_to_levels(all_neg_maps, num_level_anchors)
  
      return target_maps_list, neg_maps_list
  
imports: import warnings
  import torch
  import torch.nn
  import torch.nn.functional
  from mmcv.cnn import ConvModule, normal_init
  from mmcv.runner import force_fp32
  from mmdet.core import build_anchor_generator, build_assigner, build_bbox_coder, build_sampler, images_to_levels, multi_apply, multiclass_nms
  from ..builder import HEADS, build_loss
  from .base_dense_head import BaseDenseHead
  from .dense_test_mixins import BBoxTestMixin
label_desc: Use image node_id 11 for calling the YOLOV3Head obj's underlying member method code with example usage: obj.get_targets(anchor_list, responsible_flag_list, gt_bboxes_list, gt_labels_list) and returns: target_maps_list,  neg_maps_list