class_docstr: The DMNet implementation based on PaddlePaddle.
  
  The original article refers to
   Junjun He, Zhongying Deng, Yu Qiao. "Dynamic Multi-scale Filters for Semantic Segmentation"
  
  Args:
      num_classes (int): The unique number of target classes.
      backbone (paddle.nn.Layer): Backbone network, currently support Resnet50_vd/Resnet101_vd.
      mid_channels (int): The middle channels of convolution layer. Default: 512.
      filter_sizes (list, tuple): The filter size of generated convolution kernel used in Dynamic Convolutional Module. Default: [1, 3, 5, 7].
      fusion (bool): Add one conv to fuse DCM output feature. Default: False.
      pretrained (str, optional): The path or url of pretrained model. Default: None.
class_docstr_tok: ["The","DMNet","implementation","based","on","PaddlePaddle",".","The","original","article","refers","to","Junjun","He",",","Zhongying","Deng",",","Yu","Qiao",".","``","Dynamic","Multi-scale","Filters","for","Semantic","Segmentation","''","Args",":","num_classes","(","int",")",":","The","unique","number","of","target","classes",".","backbone","(","paddle.nn.Layer",")",":","Backbone","network",",","currently","support","Resnet50_vd\/Resnet101_vd",".","mid_channels","(","int",")",":","The","middle","channels","of","convolution","layer",".","Default",":","512.","filter_sizes","(","list",",","tuple",")",":","The","filter","size","of","generated","convolution","kernel","used","in","Dynamic","Convolutional","Module",".","Default",":","[","1",",","3",",","5",",","7","]",".","fusion","(","bool",")",":","Add","one","conv","to","fuse","DCM","output","feature",".","Default",":","False",".","pretrained","(","str",",","optional",")",":","The","path","or","url","of","pretrained","model",".","Default",":","None","."]
code: def __init__(
      self,
      num_classes,
      backbone,
      mid_channels=512,
      filter_sizes=[1, 3, 5, 7],
      fusion=False,
      pretrained=None,
  ):
      super().__init__()
      self.backbone = backbone
      self.dcm_modules = nn.LayerList()
      for filter_size in filter_sizes:
          self.dcm_modules.append(
              DCM(
                  filter_size,
                  fusion,
                  self.backbone.feat_channels[-1],
                  mid_channels,
              ),
          )
      self.bottleneck = layers.ConvBNReLU(
          self.backbone.feat_channels[-1]
          + len(filter_sizes) * mid_channels,
          mid_channels,
          3,
          padding=1,
      )
      self.cls = nn.Conv2D(mid_channels, num_classes, 1)
  
      self.fcn_head = nn.Sequential(
          layers.ConvBNReLU(
              self.backbone.feat_channels[2], mid_channels, 3, padding=1
          ),
          nn.Conv2D(mid_channels, num_classes, 1),
      )
  
      self.pretrained = pretrained
      self.init_weight()
  
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 DMNet object from inherited base classes: nn with example: obj = DMNet(num_classes, backbone, mid_channels, filter_sizes, fusion, pretrained)