class_docstr: Dynamic Convolutional Module used in DMNet.
  
  Args:
      filter_size (int): The filter size of generated convolution kernel used in Dynamic Convolutional Module.
      fusion (bool): Add one conv to fuse DCM output feature.
      in_channels (int): Input channels.
      channels (int): Channels after modules, before conv_seg.
class_docstr_tok: ["Dynamic","Convolutional","Module","used","in","DMNet",".","Args",":","filter_size","(","int",")",":","The","filter","size","of","generated","convolution","kernel","used","in","Dynamic","Convolutional","Module",".","fusion","(","bool",")",":","Add","one","conv","to","fuse","DCM","output","feature",".","in_channels","(","int",")",":","Input","channels",".","channels","(","int",")",":","Channels","after","modules",",","before","conv_seg","."]
code: def __init__(self, filter_size, fusion, in_channels, channels):
      super().__init__()
      self.filter_size = filter_size
      self.fusion = fusion
      self.channels = channels
  
      pad = (self.filter_size - 1) // 2
      if (self.filter_size - 1) % 2 == 0:
          self.pad = (pad, pad, pad, pad)
      else:
          self.pad = (pad + 1, pad, pad + 1, pad)
  
      self.avg_pool = nn.AdaptiveAvgPool2D(filter_size)
      self.filter_gen_conv = nn.Conv2D(in_channels, channels, 1)
      self.input_redu_conv = layers.ConvBNReLU(in_channels, channels, 1)
  
      self.norm = layers.SyncBatchNorm(channels)
      self.act = nn.ReLU()
  
      if self.fusion:
          self.fusion_conv = layers.ConvBNReLU(channels, channels, 1)
  
file_path: PaddleSeg/paddleseg/models/dmnet.py
imports: 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 DCM object from inherited base classes: nn with example: obj = DCM(filter_size, fusion, in_channels, channels)