code: def __init__(
      self,
      in_channels,
      out_channels,
      norm_layer=nn.BatchNorm,
      norm_kwargs=None,
      **kwargs,
  ):
      super(DANetHead, self).__init__()
      inter_channels = in_channels // 4
      self.conv5a = nn.HybridSequential()
      self.conv5a.add(
          nn.Conv2D(
              in_channels=in_channels,
              channels=inter_channels,
              kernel_size=3,
              padding=1,
              use_bias=False,
          )
      )
      self.conv5a.add(
          norm_layer(
              in_channels=inter_channels,
              **({} if norm_kwargs is None else norm_kwargs),
          )
      )
      self.conv5a.add(nn.Activation("relu"))
  
      self.conv5c = nn.HybridSequential()
      self.conv5c.add(
          nn.Conv2D(
              in_channels=in_channels,
              channels=inter_channels,
              kernel_size=3,
              padding=1,
              use_bias=False,
          )
      )
      self.conv5c.add(
          norm_layer(
              in_channels=inter_channels,
              **({} if norm_kwargs is None else norm_kwargs),
          )
      )
      self.conv5c.add(nn.Activation("relu"))
  
      self.sa = PAM_Module(inter_channels)
      self.sc = CAM_Module(inter_channels)
      self.conv51 = nn.HybridSequential()
      self.conv51.add(
          nn.Conv2D(
              in_channels=inter_channels,
              channels=inter_channels,
              kernel_size=3,
              padding=1,
              use_bias=False,
          )
      )
      self.conv51.add(
          norm_layer(
              in_channels=inter_channels,
              **({} if norm_kwargs is None else norm_kwargs),
          )
      )
      self.conv51.add(nn.Activation("relu"))
  
      self.conv52 = nn.HybridSequential()
      self.conv52.add(
          nn.Conv2D(
              in_channels=inter_channels,
              channels=inter_channels,
              kernel_size=3,
              padding=1,
              use_bias=False,
          )
      )
      self.conv52.add(
          norm_layer(
              in_channels=inter_channels,
              **({} if norm_kwargs is None else norm_kwargs),
          )
      )
      self.conv52.add(nn.Activation("relu"))
  
      self.conv6 = nn.HybridSequential()
      # self.conv6.add(nn.Dropout(0.1))
      self.conv6.add(
          nn.Conv2D(
              in_channels=512, channels=out_channels, kernel_size=1
          )
      )
  
      self.conv7 = nn.HybridSequential()
      # self.conv7.add(nn.Dropout(0.1))
      self.conv7.add(
          nn.Conv2D(
              in_channels=512, channels=out_channels, kernel_size=1
          )
      )
  
      self.conv8 = nn.HybridSequential()
      # self.conv8.add(nn.Dropout(0.1))
      self.conv8.add(
          nn.Conv2D(
              in_channels=512, channels=out_channels, kernel_size=1
          )
      )
  
file_path: gluon-cv/gluoncv/model_zoo/danet.py
imports: from mxnet.gluon import nn
  from mxnet.context import cpu
  from mxnet.gluon.nn import HybridBlock
  from .segbase import SegBaseModel
  from .fcn import _FCNHead
  from .attention import PAM_Module, CAM_Module
label_desc: Use image node_id 1 to create a new DANetHead object from inherited base classes: HybridBlock with example: obj = DANetHead(in_channels, out_channels, norm_layer, norm_kwargs)