class_docstr: Dual Attention Networks for Semantic Segmentation
  
  Parameters
  ----------
  nclass : int
      Number of categories for the training dataset.
  backbone : string
      Pre-trained dilated backbone network type (default:'resnet50'; 'resnet50',
      'resnet101').
  norm_layer : object
      Normalization layer used in backbone network (default: :class:`mxnet.gluon.nn.BatchNorm`;
  
  Reference:
      Jun Fu, Jing Liu, Haijie Tian, Yong Li, Yongjun Bao, Zhiwei Fang, Hanqing Lu. "Dual Attention
      Network for Scene Segmentation." *CVPR*, 2019
class_docstr_tok: ["Dual","Attention","Networks","for","Semantic","Segmentation","Parameters","--","--","--","--","--","nclass",":","int","Number","of","categories","for","the","training","dataset",".","backbone",":","string","Pre-trained","dilated","backbone","network","type","(","default",":","'resnet50","'",";","'resnet50","'",",","'resnet101","'",")",".","norm_layer",":","object","Normalization","layer","used","in","backbone","network","(","default",":",":","class",":","`","mxnet.gluon.nn.BatchNorm","`",";","Reference",":","Jun","Fu",",","Jing","Liu",",","Haijie","Tian",",","Yong","Li",",","Yongjun","Bao",",","Zhiwei","Fang",",","Hanqing","Lu",".","``","Dual","Attention","Network","for","Scene","Segmentation",".","''","*","CVPR","*",",","2019"]
code: def __init__(
      self,
      nclass,
      backbone="resnet50",
      aux=False,
      ctx=cpu(),
      pretrained_base=True,
      height=None,
      width=None,
      base_size=520,
      crop_size=480,
      dilated=True,
      **kwargs,
  ):
      super(DANet, self).__init__(
          nclass,
          aux,
          backbone,
          ctx=ctx,
          base_size=base_size,
          crop_size=crop_size,
          pretrained_base=pretrained_base,
          **kwargs,
      )
      self.aux = aux
      height = height if height is not None else crop_size
      width = width if width is not None else crop_size
  
      with self.name_scope():
          self.head = DANetHead(2048, nclass, **kwargs)
          self.head.initialize(ctx=ctx)
  
      self._up_kwargs = {"height": height, "width": width}
  
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 DANet object from inherited base classes: SegBaseModel with example: obj = DANet(nclass, backbone, aux, ctx, pretrained_base, height, width, base_size, crop_size, dilated)