class_docstr: Head of Conditional DETR. Conditional DETR: Conditional DETR for Fast
  Training Convergence. More details can be found in the `paper.
  
  <https://arxiv.org/abs/2108.06152>`_ .
class_docstr_tok: ["Head","of","Conditional","DETR",".","Conditional","DETR",":","Conditional","DETR","for","Fast","Training","Convergence",".","More","details","can","be","found","in","the","`","paper",".","<","https",":","\/\/arxiv.org\/abs\/2108.06152",">","`","_","."]
docstr: Initialize weights of the transformer head.
docstr_tok: ["Initialize","weights","of","the","transformer","head","."]
code: def init_weights(self):
      """Initialize weights of the transformer head."""
      super().init_weights()
      # The initialization below for transformer head is very
      # important as we use Focal_loss for loss_cls
      if self.loss_cls.use_sigmoid:
          bias_init = bias_init_with_prob(0.01)
          nn.init.constant_(self.fc_cls.bias, bias_init)
  
file_path: mmdetection/mmdet/models/dense_heads/conditional_detr_head.py
imports: from typing import Tuple
  import torch
  import torch.nn
  from mmengine.model import bias_init_with_prob
  from torch import Tensor
  from mmdet.models.layers.transformer import inverse_sigmoid
  from mmdet.registry import MODELS
  from mmdet.structures import SampleList
  from mmdet.utils import InstanceList
  from .detr_head import DETRHead
label_desc: Use image node_id 1 for calling the ConditionalDETRHead obj's underlying member method code with example usage: obj.init_weights() without return types