class_docstr: RTMDetHead with separated BN layers and shared conv layers.
  
  Args:
      num_classes (int): Number of categories excluding the background
          category.
      in_channels (int): Number of channels in the input feature map.
      share_conv (bool): Whether to share conv layers between stages.
          Defaults to True.
      use_depthwise (bool): Whether to use depthwise separable convolution in
          head. Defaults to False.
      norm_cfg (:obj:`ConfigDict` or dict)): Config dict for normalization
          layer. Defaults to dict(type='BN', momentum=0.03, eps=0.001).
      act_cfg (:obj:`ConfigDict` or dict)): Config dict for activation layer.
          Defaults to dict(type='SiLU').
      pred_kernel_size (int): Kernel size of prediction layer. Defaults to 1.
class_docstr_tok: ["RTMDetHead","with","separated","BN","layers","and","shared","conv","layers",".","Args",":","num_classes","(","int",")",":","Number","of","categories","excluding","the","background","category",".","in_channels","(","int",")",":","Number","of","channels","in","the","input","feature","map",".","share_conv","(","bool",")",":","Whether","to","share","conv","layers","between","stages",".","Defaults","to","True",".","use_depthwise","(","bool",")",":","Whether","to","use","depthwise","separable","convolution","in","head",".","Defaults","to","False",".","norm_cfg","(",":","obj",":","`","ConfigDict","`","or","dict",")",")",":","Config","dict","for","normalization","layer",".","Defaults","to","dict","(","type='BN","'",",","momentum=0.03",",","eps=0.001",")",".","act_cfg","(",":","obj",":","`","ConfigDict","`","or","dict",")",")",":","Config","dict","for","activation","layer",".","Defaults","to","dict","(","type='SiLU","'",")",".","pred_kernel_size","(","int",")",":","Kernel","size","of","prediction","layer",".","Defaults","to","1","."]
code: def __init__(
      self,
      num_classes: int,
      in_channels: int,
      share_conv: bool = True,
      use_depthwise: bool = False,
      norm_cfg: ConfigType = dict(type="BN", momentum=0.03, eps=0.001),
      act_cfg: ConfigType = dict(type="SiLU"),
      pred_kernel_size: int = 1,
      exp_on_reg=False,
      **kwargs,
  ) -> None:
      self.share_conv = share_conv
      self.exp_on_reg = exp_on_reg
      self.use_depthwise = use_depthwise
      super().__init__(
          num_classes,
          in_channels,
          norm_cfg=norm_cfg,
          act_cfg=act_cfg,
          pred_kernel_size=pred_kernel_size,
          **kwargs,
      )
  
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 1 to create a new RTMDetSepBNHead object from inherited base classes: RTMDetHead with example: obj = RTMDetSepBNHead(num_classes, in_channels, share_conv, use_depthwise, norm_cfg, act_cfg, pred_kernel_size, exp_on_reg)