code: def __init__(
      self,
      in_channels: int,
      out_channels: int,
      kernel_size: int,
      stride: int = 1,
      dilation: int = 1,
      groups: int = 1,
      is_vd_mode: bool = False,
      act: str = None,
      data_format: str = "NCHW",
  ):
      super(ConvBNLayer, self).__init__()
      if dilation != 1 and kernel_size != 3:
          raise RuntimeError(
              "When the dilation isn't 1,"
              "the kernel_size should be 3."
          )
  
      self.is_vd_mode = is_vd_mode
      self._pool2d_avg = nn.AvgPool2D(
          kernel_size=2,
          stride=2,
          padding=0,
          ceil_mode=True,
          data_format=data_format,
      )
      self._conv = nn.Conv2D(
          in_channels=in_channels,
          out_channels=out_channels,
          kernel_size=kernel_size,
          stride=stride,
          padding=(kernel_size - 1) // 2 if dilation == 1 else dilation,
          dilation=dilation,
          groups=groups,
          bias_attr=False,
          data_format=data_format,
      )
  
      self._batch_norm = layers.SyncBatchNorm(
          out_channels, data_format=data_format
      )
      self._act_op = layers.Activation(act=act)
  
imports: from typing import Union, List, Tuple
  import paddle
  import paddle.nn
  import paddle.nn.functional
  import ann_resnet50_cityscapes.layers
label_desc: Use image node_id 1 to create a new ConvBNLayer object from inherited base classes: nn with example: obj = ConvBNLayer(in_channels, out_channels, kernel_size, stride, dilation, groups, is_vd_mode, act, data_format)