code: def __init__(
      self,
      ch_in,
      ch_out,
      filter_size,
      stride,
      groups=1,
      act=None,
      norm_type="bn",
      norm_decay=0.0,
      freeze_norm=True,
      lr=1.0,
      dcn_v2=False,
  ):
      super(ConvNormLayer, self).__init__()
      assert norm_type in ["bn", "sync_bn"]
      self.norm_type = norm_type
      self.act = act
      self.dcn_v2 = dcn_v2
  
      if not self.dcn_v2:
          self.conv = nn.Conv2D(
              in_channels=ch_in,
              out_channels=ch_out,
              kernel_size=filter_size,
              stride=stride,
              padding=(filter_size - 1) // 2,
              groups=groups,
              weight_attr=ParamAttr(learning_rate=lr),
              bias_attr=False,
          )
      else:
          self.offset_channel = 2 * filter_size**2
          self.mask_channel = filter_size**2
  
          self.conv_offset = nn.Conv2D(
              in_channels=ch_in,
              out_channels=3 * filter_size**2,
              kernel_size=filter_size,
              stride=stride,
              padding=(filter_size - 1) // 2,
              weight_attr=ParamAttr(initializer=Constant(0.0)),
              bias_attr=ParamAttr(initializer=Constant(0.0)),
          )
          self.conv = DeformConv2D(
              in_channels=ch_in,
              out_channels=ch_out,
              kernel_size=filter_size,
              stride=stride,
              padding=(filter_size - 1) // 2,
              dilation=1,
              groups=groups,
              weight_attr=ParamAttr(learning_rate=lr),
              bias_attr=False,
          )
  
      norm_lr = 0.0 if freeze_norm else lr
      param_attr = ParamAttr(
          learning_rate=norm_lr,
          regularizer=L2Decay(norm_decay),
          trainable=False if freeze_norm else True,
      )
      bias_attr = ParamAttr(
          learning_rate=norm_lr,
          regularizer=L2Decay(norm_decay),
          trainable=False if freeze_norm else True,
      )
  
      global_stats = True if freeze_norm else None
      if norm_type in ["sync_bn", "bn"]:
          self.norm = nn.BatchNorm2D(
              ch_out,
              weight_attr=param_attr,
              bias_attr=bias_attr,
              use_global_stats=global_stats,
          )
      norm_params = self.norm.parameters()
  
      if freeze_norm:
          for param in norm_params:
              param.stop_gradient = True
  
imports: import math
  from numbers import Integral
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from ppdet.core.workspace import register, serializable
  from paddle.regularizer import L2Decay
  from paddle.nn.initializer import Uniform
  from paddle import ParamAttr
  from paddle.nn.initializer import Constant
  from paddle.vision.ops import DeformConv2D
  from .name_adapter import NameAdapter
  from ..shape_spec import ShapeSpec
label_desc: Use image node_id 1 to create a new ConvNormLayer object from inherited base classes: nn with example: obj = ConvNormLayer(ch_in, ch_out, filter_size, stride, groups, act, norm_type, norm_decay, freeze_norm, lr, dcn_v2)