class_docstr: ConvModule includes Conv1/Conv2D.
class_docstr_tok: ["ConvModule","includes","Conv1\/Conv2D","."]
code: def __init__(
      self,
      in_channels,
      out_channels,
      kernel_size,
      padding=0,
      stride=1,
      conv_cfg="Conv1D",
      norm_cfg="None",
      **kwargs,
  ):
      super().__init__()
      if conv_cfg == "Conv1D":
          self._conv = nn.Conv1D(
              in_channels,
              out_channels,
              kernel_size,
              stride=stride,
              padding=padding,
              **kwargs,
          )
      if conv_cfg == "Conv2D":
          self._conv = nn.Conv2D(
              in_channels,
              out_channels,
              kernel_size,
              stride=stride,
              padding=padding,
              **kwargs,
          )
      if "data_format" in kwargs:
          data_format = kwargs["data_format"]
      else:
          data_format = "NCHW"
      if norm_cfg != "None":
          self._batch_norm = layers.SyncBatchNorm(
              out_channels, data_format=data_format
          )
      else:
          self._batch_norm = None
  
imports: import numpy
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddleseg.cvlibs import manager
  from paddleseg.models import layers
  from paddleseg.utils import utils
label_desc: Use image node_id 1 to create a new ConvModule object from inherited base classes: nn with example: obj = ConvModule(in_channels, out_channels, kernel_size, padding, stride, conv_cfg, norm_cfg)