class_docstr: Standard RPN classification and regression heads described in :paper:`Faster R-CNN`.
  Uses a 3x3 conv to produce a shared hidden state from which one 1x1 conv predicts
  objectness logits for each anchor and a second 1x1 conv predicts bounding-box deltas
  specifying how to deform each anchor into an object proposal.
class_docstr_tok: ["Standard","RPN","classification","and","regression","heads","described","in",":","paper",":","`","Faster","R-CNN","`",".","Uses","a","3x3","conv","to","produce","a","shared","hidden","state","from","which","one","1x1","conv","predicts","objectness","logits","for","each","anchor","and","a","second","1x1","conv","predicts","bounding-box","deltas","specifying","how","to","deform","each","anchor","into","an","object","proposal","."]
docstr: Args:
      features (list[Tensor]): list of feature maps
  
  Returns:
      list[Tensor]: A list of L elements.
          Element i is a tensor of shape (N, A, Hi, Wi) representing
          the predicted objectness logits for all anchors. A is the number of cell anchors.
      list[Tensor]: A list of L elements. Element i is a tensor of shape
          (N, A*box_dim, Hi, Wi) representing the predicted "deltas" used to transform anchors
          to proposals.
docstr_tok: ["Args",":","features","(","list","[","Tensor","]",")",":","list","of","feature","maps","Returns",":","list","[","Tensor","]",":","A","list","of","L","elements",".","Element","i","is","a","tensor","of","shape","(","N",",","A",",","Hi",",","Wi",")","representing","the","predicted","objectness","logits","for","all","anchors",".","A","is","the","number","of","cell","anchors",".","list","[","Tensor","]",":","A","list","of","L","elements",".","Element","i","is","a","tensor","of","shape","(","N",",","A","*","box_dim",",","Hi",",","Wi",")","representing","the","predicted","``","deltas","''","used","to","transform","anchors","to","proposals","."]
code: def forward(self, features: List[torch.Tensor]):
      """
      Args:
          features (list[Tensor]): list of feature maps
  
      Returns:
          list[Tensor]: A list of L elements.
              Element i is a tensor of shape (N, A, Hi, Wi) representing
              the predicted objectness logits for all anchors. A is the number of cell anchors.
          list[Tensor]: A list of L elements. Element i is a tensor of shape
              (N, A*box_dim, Hi, Wi) representing the predicted "deltas" used to transform anchors
              to proposals.
      """
      pred_objectness_logits = []
      pred_anchor_deltas = []
      for x in features:
          t = self.conv(x)
          pred_objectness_logits.append(self.objectness_logits(t))
          pred_anchor_deltas.append(self.anchor_deltas(t))
      return pred_objectness_logits, pred_anchor_deltas
  
imports: from typing import Dict, List, Optional, Tuple, Union
  import torch
  import torch.nn.functional
  from torch import nn
  from detectron2.config import configurable
  from detectron2.layers import Conv2d, ShapeSpec, cat
  from detectron2.structures import Boxes, ImageList, Instances, pairwise_iou
  from detectron2.utils.events import get_event_storage
  from detectron2.utils.memory import retry_if_cuda_oom
  from detectron2.utils.registry import Registry
  from ..anchor_generator import build_anchor_generator
  from ..box_regression import Box2BoxTransform, _dense_box_regression_loss
  from ..matcher import Matcher
  from ..sampling import subsample_labels
  from .build import PROPOSAL_GENERATOR_REGISTRY
  from .proposal_utils import find_top_rpn_proposals
label_desc: Use image node_id 4 for calling the StandardRPNHead obj's underlying member method code with example usage: obj.forward(features) and returns: pred_objectness_logits,  pred_anchor_deltas