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.
      conv_cfg (dict | None): Config of conv layers.
      norm_cfg (dict | None): Config of norm layers.
      act_cfg (dict): Config of activation layers.
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",".","conv_cfg","(","dict","|","None",")",":","Config","of","conv","layers",".","norm_cfg","(","dict","|","None",")",":","Config","of","norm","layers",".","act_cfg","(","dict",")",":","Config","of","activation","layers","."]
code: def __init__(
      self,
      filter_size,
      fusion,
      in_channels,
      channels,
      conv_cfg,
      norm_cfg,
      act_cfg,
  ):
      super(DCM, self).__init__()
      self.filter_size = filter_size
      self.fusion = fusion
      self.in_channels = in_channels
      self.channels = channels
      self.conv_cfg = conv_cfg
      self.norm_cfg = norm_cfg
      self.act_cfg = act_cfg
      self.filter_gen_conv = nn.Conv2d(
          self.in_channels, self.channels, 1, 1, 0
      )
  
      self.input_redu_conv = ConvModule(
          self.in_channels,
          self.channels,
          1,
          conv_cfg=self.conv_cfg,
          norm_cfg=self.norm_cfg,
          act_cfg=self.act_cfg,
      )
  
      if self.norm_cfg is not None:
          self.norm = build_norm_layer(self.norm_cfg, self.channels)[1]
      else:
          self.norm = None
      self.activate = build_activation_layer(self.act_cfg)
  
      if self.fusion:
          self.fusion_conv = ConvModule(
              self.channels,
              self.channels,
              1,
              conv_cfg=self.conv_cfg,
              norm_cfg=self.norm_cfg,
              act_cfg=self.act_cfg,
          )
  
file_path: lavis/lavis/common/annotator/uniformer/mmseg/models/decode_heads/dm_head.py
imports: import torch
  import torch.nn
  import torch.nn.functional
  from annotator.uniformer.mmcv.cnn import ConvModule, build_activation_layer, build_norm_layer
  from ..builder import HEADS
  from .decode_head import BaseDecodeHead
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, conv_cfg, norm_cfg, act_cfg)