class_docstr: Implements DeepLabV3 model from
  `"Rethinking Atrous Convolution for Semantic Image Segmentation"
  <https://arxiv.org/abs/1706.05587>`_.
  
  Args:
      backbone (nn.Module): the network used to compute the features for the model.
          The backbone should return an OrderedDict[Tensor], with the key being
          "out" for the last feature map used, and "aux" if an auxiliary classifier
          is used.
      classifier (nn.Module): module that takes the "out" element returned from
          the backbone and returns a dense prediction.
      aux_classifier (nn.Module, optional): auxiliary classifier used during training
class_docstr_tok: ["Implements","DeepLabV3","model","from","`","``","Rethinking","Atrous","Convolution","for","Semantic","Image","Segmentation","''","<","https",":","\/\/arxiv.org\/abs\/1706.05587",">","`","_",".","Args",":","backbone","(","nn.Module",")",":","the","network","used","to","compute","the","features","for","the","model",".","The","backbone","should","return","an","OrderedDict","[","Tensor","]",",","with","the","key","being","``","out","''","for","the","last","feature","map","used",",","and","``","aux","''","if","an","auxiliary","classifier","is","used",".","classifier","(","nn.Module",")",":","module","that","takes","the","``","out","''","element","returned","from","the","backbone","and","returns","a","dense","prediction",".","aux_classifier","(","nn.Module",",","optional",")",":","auxiliary","classifier","used","during","training"]
code: def forward(self, x: Tensor) -> Dict[str, Tensor]:
      input_shape = x.shape[-2:]
      # contract: features is a dict of tensors
      features = self.backbone(x)
  
      result = OrderedDict()
      x = features["out"]
      x = self.classifier(x)
      # 使用双线性插值还原回原图尺度
      x = F.interpolate(
          x, size=input_shape, mode="bilinear", align_corners=False
      )
      result["out"] = x
  
      if self.aux_classifier is not None:
          x = features["aux"]
          x = self.aux_classifier(x)
          # 使用双线性插值还原回原图尺度
          x = F.interpolate(
              x, size=input_shape, mode="bilinear", align_corners=False
          )
          result["aux"] = x
  
      return result
  
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 2 for calling the DeepLabV3 obj's underlying member method code with example usage: obj.forward(x) and returns: result