class_docstr: The head used in RetinaNet for object classification and box regression.
  It has two subnets for the two tasks, with a common structure but separate parameters.
class_docstr_tok: ["The","head","used","in","RetinaNet","for","object","classification","and","box","regression",".","It","has","two","subnets","for","the","two","tasks",",","with","a","common","structure","but","separate","parameters","."]
docstr: Arguments:
      features (list[Tensor]): FPN feature map tensors in high to low resolution.
          Each tensor in the list correspond to different feature levels.
  
  Returns:
      logits (list[Tensor]): #lvl tensors, each has shape (N, AxK, Hi, Wi).
          The tensor predicts the classification probability
          at each spatial position for each of the A anchors and K object
          classes.
      bbox_reg (list[Tensor]): #lvl tensors, each has shape (N, Ax4, Hi, Wi).
          The tensor predicts 4-vector (dx,dy,dw,dh) box
          regression values for every anchor. These values are the
          relative offset between the anchor and the ground truth box.
docstr_tok: ["Arguments",":","features","(","list","[","Tensor","]",")",":","FPN","feature","map","tensors","in","high","to","low","resolution",".","Each","tensor","in","the","list","correspond","to","different","feature","levels",".","Returns",":","logits","(","list","[","Tensor","]",")",":","#","lvl","tensors",",","each","has","shape","(","N",",","AxK",",","Hi",",","Wi",")",".","The","tensor","predicts","the","classification","probability","at","each","spatial","position","for","each","of","the","A","anchors","and","K","object","classes",".","bbox_reg","(","list","[","Tensor","]",")",":","#","lvl","tensors",",","each","has","shape","(","N",",","Ax4",",","Hi",",","Wi",")",".","The","tensor","predicts","4-vector","(","dx",",","dy",",","dw",",","dh",")","box","regression","values","for","every","anchor",".","These","values","are","the","relative","offset","between","the","anchor","and","the","ground","truth","box","."]
code: def forward(self, features: List[Tensor]):
      """
      Arguments:
          features (list[Tensor]): FPN feature map tensors in high to low resolution.
              Each tensor in the list correspond to different feature levels.
  
      Returns:
          logits (list[Tensor]): #lvl tensors, each has shape (N, AxK, Hi, Wi).
              The tensor predicts the classification probability
              at each spatial position for each of the A anchors and K object
              classes.
          bbox_reg (list[Tensor]): #lvl tensors, each has shape (N, Ax4, Hi, Wi).
              The tensor predicts 4-vector (dx,dy,dw,dh) box
              regression values for every anchor. These values are the
              relative offset between the anchor and the ground truth box.
      """
      assert len(features) == self._num_features
      logits = []
      bbox_reg = []
      for feature in features:
          logits.append(self.cls_score(self.cls_subnet(feature)))
          bbox_reg.append(self.bbox_pred(self.bbox_subnet(feature)))
      return logits, bbox_reg
  
imports: import logging
  import math
  from typing import List, Tuple
  import torch
  from fvcore.nn import sigmoid_focal_loss_jit
  from torch import Tensor, nn
  from torch.nn import functional
  from detectron2.config import configurable
  from detectron2.layers import CycleBatchNormList, ShapeSpec, batched_nms, cat, get_norm
  from detectron2.structures import Boxes, ImageList, Instances, pairwise_iou
  from detectron2.utils.events import get_event_storage
  from ..anchor_generator import build_anchor_generator
  from ..backbone import Backbone, build_backbone
  from ..box_regression import Box2BoxTransform, _dense_box_regression_loss
  from ..matcher import Matcher
  from .build import META_ARCH_REGISTRY
  from .dense_detector import DenseDetector, permute_to_N_HWA_K
label_desc: Use image node_id 3 for calling the RetinaNetHead obj's underlying member method code with example usage: obj.forward(features) and returns: logits,  bbox_reg