class_docstr: CenterNetUpdateHead is an improved version of CenterNet in CenterNet2.
  
  Paper link `<https://arxiv.org/abs/2103.07461>`_.
class_docstr_tok: ["CenterNetUpdateHead","is","an","improved","version","of","CenterNet","in","CenterNet2",".","Paper","link","`","<","https",":","\/\/arxiv.org\/abs\/2103.07461",">","`","_","."]
docstr: Forward features of a single scale level.
  
  Args:
      x (Tensor): FPN feature maps of the specified stride.
      scale (:obj:`mmcv.cnn.Scale`): Learnable scale module to resize
          the bbox prediction.
      stride (int): The corresponding stride for feature maps.
  
  Returns:
      tuple: scores for each class, bbox predictions of
      input feature maps.
docstr_tok: ["Forward","features","of","a","single","scale","level",".","Args",":","x","(","Tensor",")",":","FPN","feature","maps","of","the","specified","stride",".","scale","(",":","obj",":","`","mmcv.cnn.Scale","`",")",":","Learnable","scale","module","to","resize","the","bbox","prediction",".","stride","(","int",")",":","The","corresponding","stride","for","feature","maps",".","Returns",":","tuple",":","scores","for","each","class",",","bbox","predictions","of","input","feature","maps","."]
code: def forward_single(
      self, x: Tensor, scale: Scale, stride: int
  ) -> Tuple[Tensor, Tensor]:
      """Forward features of a single scale level.
  
      Args:
          x (Tensor): FPN feature maps of the specified stride.
          scale (:obj:`mmcv.cnn.Scale`): Learnable scale module to resize
              the bbox prediction.
          stride (int): The corresponding stride for feature maps.
  
      Returns:
          tuple: scores for each class, bbox predictions of
          input feature maps.
      """
      for m in self.reg_convs:
          x = m(x)
      cls_score = self.conv_cls(x)
      bbox_pred = self.conv_reg(x)
      # scale the bbox_pred of different level
      # float to avoid overflow when enabling FP16
      bbox_pred = scale(bbox_pred).float()
      # bbox_pred needed for gradient computation has been modified
      # by F.relu(bbox_pred) when run with PyTorch 1.10. So replace
      # F.relu(bbox_pred) with bbox_pred.clamp(min=0)
      bbox_pred = bbox_pred.clamp(min=0)
      if not self.training:
          bbox_pred *= stride
      return cls_score, bbox_pred
  
file_path: mmdetection/projects/Detic/detic/centernet_rpn_head.py
imports: import copy
  from typing import List, Sequence, Tuple
  import torch
  import torch.nn
  from mmcv.cnn import Scale
  from mmengine import ConfigDict
  from mmengine.structures import InstanceData
  from torch import Tensor
  from mmdet.models.dense_heads import CenterNetUpdateHead
  from mmdet.models.utils import multi_apply
  from mmdet.registry import MODELS
label_desc: Use image node_id 4 for calling the CenterNetRPNHead obj's underlying member method code with example usage: obj.forward_single(x, scale, stride) and returns: cls_score,  bbox_pred