class_docstr: Dynamic Mask Head for
  `Instances as Queries <http://arxiv.org/abs/2105.01928>`_
  
  Args:
      num_convs (int): Number of convolution layer.
          Defaults to 4.
      roi_feat_size (int): The output size of RoI extractor,
          Defaults to 14.
      in_channels (int): Input feature channels.
          Defaults to 256.
      conv_kernel_size (int): Kernel size of convolution layers.
          Defaults to 3.
      conv_out_channels (int): Output channels of convolution layers.
          Defaults to 256.
      num_classes (int): Number of classes.
          Defaults to 80
      class_agnostic (int): Whether generate class agnostic prediction.
          Defaults to False.
      dropout (float): Probability of drop the channel.
          Defaults to 0.0
      upsample_cfg (:obj:`ConfigDict` or dict): The config for
          upsample layer.
      conv_cfg (:obj:`ConfigDict` or dict, optional): The convolution
          layer config.
      norm_cfg (:obj:`ConfigDict` or dict, optional): The norm layer config.
      dynamic_conv_cfg (:obj:`ConfigDict` or dict): The dynamic convolution
          layer config.
      loss_mask (:obj:`ConfigDict` or dict): The config for mask loss.
class_docstr_tok: ["Dynamic","Mask","Head","for","`","Instances","as","Queries","<","http",":","\/\/arxiv.org\/abs\/2105.01928",">","`","_","Args",":","num_convs","(","int",")",":","Number","of","convolution","layer",".","Defaults","to","4.","roi_feat_size","(","int",")",":","The","output","size","of","RoI","extractor",",","Defaults","to","14.","in_channels","(","int",")",":","Input","feature","channels",".","Defaults","to","256.","conv_kernel_size","(","int",")",":","Kernel","size","of","convolution","layers",".","Defaults","to","3.","conv_out_channels","(","int",")",":","Output","channels","of","convolution","layers",".","Defaults","to","256.","num_classes","(","int",")",":","Number","of","classes",".","Defaults","to","80","class_agnostic","(","int",")",":","Whether","generate","class","agnostic","prediction",".","Defaults","to","False",".","dropout","(","float",")",":","Probability","of","drop","the","channel",".","Defaults","to","0.0","upsample_cfg","(",":","obj",":","`","ConfigDict","`","or","dict",")",":","The","config","for","upsample","layer",".","conv_cfg","(",":","obj",":","`","ConfigDict","`","or","dict",",","optional",")",":","The","convolution","layer","config",".","norm_cfg","(",":","obj",":","`","ConfigDict","`","or","dict",",","optional",")",":","The","norm","layer","config",".","dynamic_conv_cfg","(",":","obj",":","`","ConfigDict","`","or","dict",")",":","The","dynamic","convolution","layer","config",".","loss_mask","(",":","obj",":","`","ConfigDict","`","or","dict",")",":","The","config","for","mask","loss","."]
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.
      """
      for p in self.parameters():
          if p.dim() > 1:
              nn.init.xavier_uniform_(p)
          nn.init.constant_(self.conv_logits.bias, 0.0)
  
file_path: mmdetection/mmdet/models/roi_heads/mask_heads/dynamic_mask_head.py
imports: from typing import List
  import torch
  import torch.nn
  from mmengine.config import ConfigDict
  from torch import Tensor
  from mmdet.models.task_modules import SamplingResult
  from mmdet.registry import MODELS
  from mmdet.utils import ConfigType, InstanceList, OptConfigType, reduce_mean
  from .fcn_mask_head import FCNMaskHead
label_desc: Use image node_id 2 for calling the DynamicMaskHead obj's underlying member method code with example usage: obj.init_weights() without return types