class_docstr: The neck used in `CenterNet <https://arxiv.org/abs/1904.07850>`_ for
  object classification and box regression.
  
  Args:
       in_channels (int): Number of input channels.
       num_deconv_filters (tuple[int]): Number of filters per stage.
       num_deconv_kernels (tuple[int]): Number of kernels per stage.
       use_dcn (bool): If True, use DCNv2. Defaults to True.
       init_cfg (:obj:`ConfigDict` or dict or list[dict] or
           list[:obj:`ConfigDict`], optional): Initialization
           config dict.
class_docstr_tok: ["The","neck","used","in","`","CenterNet","<","https",":","\/\/arxiv.org\/abs\/1904.07850",">","`","_","for","object","classification","and","box","regression",".","Args",":","in_channels","(","int",")",":","Number","of","input","channels",".","num_deconv_filters","(","tuple","[","int","]",")",":","Number","of","filters","per","stage",".","num_deconv_kernels","(","tuple","[","int","]",")",":","Number","of","kernels","per","stage",".","use_dcn","(","bool",")",":","If","True",",","use","DCNv2",".","Defaults","to","True",".","init_cfg","(",":","obj",":","`","ConfigDict","`","or","dict","or","list","[","dict","]","or","list","[",":","obj",":","`","ConfigDict","`","]",",","optional",")",":","Initialization","config","dict","."]
docstr: Initialize the parameters.
docstr_tok: ["Initialize","the","parameters","."]
code: def init_weights(self) -> None:
      """Initialize the parameters."""
      for m in self.modules():
          if isinstance(m, nn.ConvTranspose2d):
              # In order to be consistent with the source code,
              # reset the ConvTranspose2d initialization parameters
              m.reset_parameters()
              # Simulated bilinear upsampling kernel
              w = m.weight.data
              f = math.ceil(w.size(2) / 2)
              c = (2 * f - 1 - f % 2) / (2.0 * f)
              for i in range(w.size(2)):
                  for j in range(w.size(3)):
                      w[0, 0, i, j] = (1 - math.fabs(i / f - c)) * (
                          1 - math.fabs(j / f - c)
                      )
              for c in range(1, w.size(0)):
                  w[c, 0, :, :] = w[0, 0, :, :]
          elif isinstance(m, nn.BatchNorm2d):
              nn.init.constant_(m.weight, 1)
              nn.init.constant_(m.bias, 0)
          # self.use_dcn is False
          elif not self.use_dcn and isinstance(m, nn.Conv2d):
              # In order to be consistent with the source code,
              # reset the Conv2d initialization parameters
              m.reset_parameters()
  
file_path: mmdetection/mmdet/models/necks/ct_resnet_neck.py
imports: import math
  from typing import Sequence, Tuple
  import torch
  import torch.nn
  from mmcv.cnn import ConvModule
  from mmengine.model import BaseModule
  from mmdet.registry import MODELS
  from mmdet.utils import OptMultiConfig
label_desc: Use image node_id 3 for calling the CTResNetNeck obj's underlying member method code with example usage: obj.init_weights() without return types