code: def get_danet(
      dataset="pascal_voc",
      backbone="resnet50",
      pretrained=False,
      root="~/.mxnet/models",
      ctx=cpu(0),
      **kwargs,
  ):
      r"""DANet model from the paper `"Dual Attention Network for Scene Segmentation"
      <https://arxiv.org/abs/1809.02983>`
      """
      acronyms = {
          "pascal_voc": "voc",
          "pascal_aug": "voc",
          "ade20k": "ade",
          "coco": "coco",
          "citys": "citys",
      }
      from ..data import datasets
  
      # infer number of classes
      model = DANet(
          nclass=datasets[dataset].NUM_CLASS,
          backbone=backbone,
          ctx=ctx,
          **kwargs,
      )
      model.classes = datasets[dataset].classes
      if pretrained:
          from .model_store import get_model_file
  
          model.load_parameters(
              get_model_file(
                  "danet_%s_%s" % (backbone, acronyms[dataset]),
                  tag=pretrained,
                  root=root,
              ),
              ctx=ctx,
          )
      return model
  
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 for calling a global function with example usage: get_danet(dataset, backbone, pretrained, root, ctx) and returns: model