class_docstr: CenterNetUpdateHead is an improved version of CenterNet in CenterNet2.
  Paper link `<https://arxiv.org/abs/2103.07461>`_.
  
  Args:
      num_classes (int): Number of categories excluding the background
          category.
      in_channels (int): Number of channel in the input feature map.
      regress_ranges (Sequence[Tuple[int, int]]): Regress range of multiple
          level points.
      hm_min_radius (int): Heatmap target minimum radius of cls branch.
          Defaults to 4.
      hm_min_overlap (float): Heatmap target minimum overlap of cls branch.
          Defaults to 0.8.
      more_pos_thresh (float): The filtering threshold when the cls branch
          adds more positive samples. Defaults to 0.2.
      more_pos_topk (int): The maximum number of additional positive samples
          added to each gt. Defaults to 9.
      soft_weight_on_reg (bool): Whether to use the soft target of the
          cls branch as the soft weight of the bbox branch.
          Defaults to False.
      loss_cls (:obj:`ConfigDict` or dict): Config of cls loss. Defaults to
          dict(type='GaussianFocalLoss', loss_weight=1.0)
      loss_bbox (:obj:`ConfigDict` or dict): Config of bbox loss. Defaults to
           dict(type='GIoULoss', loss_weight=2.0).
      norm_cfg (:obj:`ConfigDict` or dict, optional): dictionary to construct
          and config norm layer.  Defaults to
          ``norm_cfg=dict(type='GN', num_groups=32, requires_grad=True)``.
      train_cfg (:obj:`ConfigDict` or dict, optional): Training config.
          Unused in CenterNet. Reserved for compatibility with
          SingleStageDetector.
      test_cfg (:obj:`ConfigDict` or dict, optional): Testing config
          of CenterNet.
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.
      """
      cls_score, bbox_pred, _, _ = super().forward_single(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
  
imports: from typing import Dict, List, Optional, Sequence, Tuple
  import torch
  import torch.nn
  from mmcv.cnn import Scale
  from mmengine.structures import InstanceData
  from torch import Tensor
  from mmdet.registry import MODELS
  from mmdet.structures.bbox import bbox2distance
  from mmdet.utils import ConfigType, InstanceList, OptConfigType, OptInstanceList, reduce_mean
  from ..utils import multi_apply
  from .anchor_free_head import AnchorFreeHead
label_desc: Use image node_id 4 for calling the CenterNetUpdateHead obj's underlying member method code with example usage: obj.forward_single(x, scale, stride) and returns: cls_score,  bbox_pred