class_docstr: ModulatedDeformConv2d with normalization layer used in DyHead.
  
  This module cannot be configured with `conv_cfg=dict(type='DCNv2')`
  because DyHead calculates offset and mask from middle-level feature.
  
  Args:
      in_channels (int): Number of input channels.
      out_channels (int): Number of output channels.
      stride (int | tuple[int], optional): Stride of the convolution.
          Default: 1.
      norm_cfg (dict, optional): Config dict for normalization layer.
          Default: dict(type='GN', num_groups=16, requires_grad=True).
class_docstr_tok: ["ModulatedDeformConv2d","with","normalization","layer","used","in","DyHead",".","This","module","can","not","be","configured","with","`","conv_cfg=dict","(","type='DCNv2","'",")","`","because","DyHead","calculates","offset","and","mask","from","middle-level","feature",".","Args",":","in_channels","(","int",")",":","Number","of","input","channels",".","out_channels","(","int",")",":","Number","of","output","channels",".","stride","(","int","|","tuple","[","int","]",",","optional",")",":","Stride","of","the","convolution",".","Default",":","1.","norm_cfg","(","dict",",","optional",")",":","Config","dict","for","normalization","layer",".","Default",":","dict","(","type='GN","'",",","num_groups=16",",","requires_grad=True",")","."]
code: def __init__(
      self,
      in_channels,
      out_channels,
      stride=1,
      norm_cfg=dict(type="GN", num_groups=16, requires_grad=True),
  ):
      super().__init__()
      self.with_norm = norm_cfg is not None
      bias = not self.with_norm
      self.conv = ModulatedDeformConv2d(
          in_channels,
          out_channels,
          3,
          stride=stride,
          padding=1,
          bias=bias,
      )
      if self.with_norm:
          self.norm = build_norm_layer(norm_cfg, out_channels)[1]
  
file_path: mmdetection/mmdet/models/necks/dyhead.py
imports: import torch.nn
  import torch.nn.functional
  from mmcv.cnn import build_activation_layer, build_norm_layer
  from mmcv.ops.modulated_deform_conv import ModulatedDeformConv2d
  from mmengine.model import BaseModule, constant_init, normal_init
  from mmdet.registry import MODELS
  from ..layers import DyReLU
label_desc: Use image node_id 1 to create a new DyDCNv2 object from inherited base classes: nn with example: obj = DyDCNv2(in_channels, out_channels, stride, norm_cfg)