class_docstr: Detection Head of RTMDet.
  
  Args:
      num_classes (int): Number of categories excluding the background
          category.
      in_channels (int): Number of channels in the input feature map.
      with_objectness (bool): Whether to add an objectness branch.
          Defaults to True.
      act_cfg (:obj:`ConfigDict` or dict): Config dict for activation layer.
          Default: dict(type='ReLU')
class_docstr_tok: ["Detection","Head","of","RTMDet",".","Args",":","num_classes","(","int",")",":","Number","of","categories","excluding","the","background","category",".","in_channels","(","int",")",":","Number","of","channels","in","the","input","feature","map",".","with_objectness","(","bool",")",":","Whether","to","add","an","objectness","branch",".","Defaults","to","True",".","act_cfg","(",":","obj",":","`","ConfigDict","`","or","dict",")",":","Config","dict","for","activation","layer",".","Default",":","dict","(","type='ReLU","'",")"]
docstr: Initialize weights of the head.
docstr_tok: ["Initialize","weights","of","the","head","."]
code: def init_weights(self) -> None:
      """Initialize weights of the head."""
      for m in self.modules():
          if isinstance(m, nn.Conv2d):
              normal_init(m, mean=0, std=0.01)
          if is_norm(m):
              constant_init(m, 1)
      bias_cls = bias_init_with_prob(0.01)
      normal_init(self.rtm_cls, std=0.01, bias=bias_cls)
      normal_init(self.rtm_reg, std=0.01)
      if self.with_objectness:
          normal_init(self.rtm_obj, std=0.01, bias=bias_cls)
  
imports: from typing import List, Optional, Tuple, Union
  import torch
  import torch.nn
  from mmcv.cnn import ConvModule, DepthwiseSeparableConvModule, Scale, is_norm
  from mmengine.model import bias_init_with_prob, constant_init, normal_init
  from mmengine.structures import InstanceData
  from torch import Tensor
  from mmdet.registry import MODELS, TASK_UTILS
  from mmdet.structures.bbox import distance2bbox
  from mmdet.utils import ConfigType, InstanceList, OptInstanceList, reduce_mean
  from ..layers.transformer import inverse_sigmoid
  from ..task_modules import anchor_inside_flags
  from ..utils import images_to_levels, multi_apply, sigmoid_geometric_mean, unmap
  from .atss_head import ATSSHead
label_desc: Use image node_id 3 for calling the RTMDetHead obj's underlying member method code with example usage: obj.init_weights() without return types