class_docstr: Dynamic Instance Interactive Head for `Sparse R-CNN: End-to-End Object
  Detection with Learnable Proposals <https://arxiv.org/abs/2011.12450>`_
  
  Args:
      num_classes (int): Number of class in dataset.
          Defaults to 80.
      num_ffn_fcs (int): The number of fully-connected
          layers in FFNs. Defaults to 2.
      num_heads (int): The hidden dimension of FFNs.
          Defaults to 8.
      num_cls_fcs (int): The number of fully-connected
          layers in classification subnet. Defaults to 1.
      num_reg_fcs (int): The number of fully-connected
          layers in regression subnet. Defaults to 3.
      feedforward_channels (int): The hidden dimension
          of FFNs. Defaults to 2048
      in_channels (int): Hidden_channels of MultiheadAttention.
          Defaults to 256.
      dropout (float): Probability of drop the channel.
          Defaults to 0.0
      ffn_act_cfg (:obj:`ConfigDict` or dict): The activation config
          for FFNs.
      dynamic_conv_cfg (:obj:`ConfigDict` or dict): The convolution
          config for DynamicConv.
      loss_iou (:obj:`ConfigDict` or dict): The config for iou or
          giou loss.
      init_cfg (:obj:`ConfigDict` or dict or list[:obj:`ConfigDict` or \
          dict]): Initialization config dict. Defaults to None.
docstr: Use xavier initialization for all weight parameter and set
  classification head bias as a specific value when use focal loss.
docstr_tok: ["Use","xavier","initialization","for","all","weight","parameter","and","set","classification","head","bias","as","a","specific","value","when","use","focal","loss","."]
code: def init_weights(self) -> None:
      """Use xavier initialization for all weight parameter and set
      classification head bias as a specific value when use focal loss.
      """
      super().init_weights()
      for p in self.parameters():
          if p.dim() > 1:
              nn.init.xavier_uniform_(p)
          else:
              # adopt the default initialization for
              # the weight and bias of the layer norm
              pass
      if self.loss_cls.use_sigmoid:
          bias_init = bias_init_with_prob(0.01)
          nn.init.constant_(self.fc_cls.bias, bias_init)
  
imports: from typing import List
  import torch
  import torch.nn
  from mmcv.cnn import build_activation_layer, build_norm_layer
  from mmcv.cnn.bricks.transformer import FFN, MultiheadAttention
  from mmengine.config import ConfigDict
  from mmengine.model import bias_init_with_prob
  from torch import Tensor
  from mmdet.models.losses import accuracy
  from mmdet.models.task_modules import SamplingResult
  from mmdet.models.utils import multi_apply
  from mmdet.registry import MODELS
  from mmdet.utils import ConfigType, OptConfigType, reduce_mean
  from .bbox_head import BBoxHead
label_desc: Use image node_id 2 for calling the DIIHead obj's underlying member method code with example usage: obj.init_weights() without return types