code: def deeplabv3_resnet50(aux, num_classes=21, pretrain_backbone=False):
      # 'resnet50_imagenet': 'https://download.pytorch.org/models/resnet50-0676ba61.pth'
      # 'deeplabv3_resnet50_coco': 'https://download.pytorch.org/models/deeplabv3_resnet50_coco-cd0a2569.pth'
      backbone = resnet50(
          replace_stride_with_dilation=[False, True, True]
      )
  
      if pretrain_backbone:
          # 载入resnet50 backbone预训练权重
          backbone.load_state_dict(
              torch.load("resnet50.pth", map_location="cpu")
          )
  
      out_inplanes = 2048
      aux_inplanes = 1024
  
      return_layers = {"layer4": "out"}
      if aux:
          return_layers["layer3"] = "aux"
      backbone = IntermediateLayerGetter(
          backbone, return_layers=return_layers
      )
  
      aux_classifier = None
      # why using aux: https://github.com/pytorch/vision/issues/4292
      if aux:
          aux_classifier = FCNHead(aux_inplanes, num_classes)
  
      classifier = DeepLabHead(out_inplanes, num_classes)
  
      model = DeepLabV3(backbone, classifier, aux_classifier)
  
      return model
  
imports: from collections import OrderedDict
  from typing import Dict, List
  import torch
  from torch import nn, Tensor
  from torch.nn import functional
  from .resnet_backbone import resnet50, resnet101
  from .mobilenet_backbone import mobilenet_v3_large
label_desc: Use image node_id 1 for calling a global function with example usage: deeplabv3_resnet50(aux, num_classes, pretrain_backbone) and returns: model