class_docstr: Detection Head of `YOLOF <https://arxiv.org/abs/2103.09460>`_
  
  Args:
      num_classes (int): The number of object classes (w/o background)
      in_channels (list[int]): The number of input channels per scale.
      cls_num_convs (int): The number of convolutions of cls branch.
         Defaults to 2.
      reg_num_convs (int): The number of convolutions of reg branch.
         Defaults to 4.
      norm_cfg (:obj:`ConfigDict` or dict): Config dict for normalization
          layer. Defaults to ``dict(type='BN', requires_grad=True)``.
class_docstr_tok: ["Detection","Head","of","`","YOLOF","<","https",":","\/\/arxiv.org\/abs\/2103.09460",">","`","_","Args",":","num_classes","(","int",")",":","The","number","of","object","classes","(","w\/o","background",")","in_channels","(","list","[","int","]",")",":","The","number","of","input","channels","per","scale",".","cls_num_convs","(","int",")",":","The","number","of","convolutions","of","cls","branch",".","Defaults","to","2.","reg_num_convs","(","int",")",":","The","number","of","convolutions","of","reg","branch",".","Defaults","to","4.","norm_cfg","(",":","obj",":","`","ConfigDict","`","or","dict",")",":","Config","dict","for","normalization","layer",".","Defaults","to","``","dict","(","type='BN","'",",","requires_grad=True",")","``","."]
code: def init_weights(self) -> None:
      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)
  
      # Use prior in model initialization to improve stability
      bias_cls = bias_init_with_prob(0.01)
      torch.nn.init.constant_(self.cls_score.bias, bias_cls)
  
imports: from typing import List, Optional, Tuple
  import torch
  import torch.nn
  from mmcv.cnn import ConvModule, 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
  from mmdet.utils import ConfigType, InstanceList, OptInstanceList, reduce_mean
  from ..task_modules.prior_generators import anchor_inside_flags
  from ..utils import levels_to_images, multi_apply, unmap
  from .anchor_head import AnchorHead
label_desc: Use image node_id 3 for calling the YOLOFHead obj's underlying member method code with example usage: obj.init_weights() without return types