class_docstr: The DeepLabV2 implementation based on PaddlePaddle.
  
  The original article refers to:
      Chen, L. C., Papandreou, G., Kokkinos, I., Murphy, K., & Yuille, A. L. (2017). Deeplab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected crfs. IEEE transactions on pattern analysis and machine intelligence, 40(4), 834-848.
  
  Args:
      backbone (paddle.nn.Layer): Backbone network, currently support Resnet101.
      align_corners (bool, optional): An argument of F.interpolate. It should be set to False when the feature size is even,
          e.g. 1024x512, otherwise it is True, e.g. 769x769. Default: False.
      pretrained (str, optional): The path or url of pretrained model. Default: None.
      data_format(str, optional): Data format that specifies the layout of input. It can be "NCHW" or "NHWC". Default: "NCHW".
class_docstr_tok: ["The","DeepLabV2","implementation","based","on","PaddlePaddle",".","The","original","article","refers","to",":","Chen",",","L.","C.",",","Papandreou",",","G.",",","Kokkinos",",","I.",",","Murphy",",","K.",",","&","Yuille",",","A.","L.","(","2017",")",".","Deeplab",":","Semantic","image","segmentation","with","deep","convolutional","nets",",","atrous","convolution",",","and","fully","connected","crfs",".","IEEE","transactions","on","pattern","analysis","and","machine","intelligence",",","40","(","4",")",",","834-848",".","Args",":","backbone","(","paddle.nn.Layer",")",":","Backbone","network",",","currently","support","Resnet101",".","align_corners","(","bool",",","optional",")",":","An","argument","of","F.interpolate",".","It","should","be","set","to","False","when","the","feature","size","is","even",",","e.g",".","1024x512",",","otherwise","it","is","True",",","e.g",".","769x769",".","Default",":","False",".","pretrained","(","str",",","optional",")",":","The","path","or","url","of","pretrained","model",".","Default",":","None",".","data_format","(","str",",","optional",")",":","Data","format","that","specifies","the","layout","of","input",".","It","can","be","``","NCHW","''","or","``","NHWC","''",".","Default",":","``","NCHW","''","."]
code: def forward(self, x):
      feat_list = self.backbone(x)
  
      if self.shape_stream:
          logit_list = self.head(
              self.backbone.conv1_logit, feat_list[-1]
          )
          logit_list.extend(feat_list[:2])
          edge_logit, seg_logit, aug_logit = [
              F.interpolate(
                  logit,
                  x.shape[2:],
                  mode="bilinear",
                  align_corners=self.align_corners,
              )
              for logit in logit_list
          ]
          return [seg_logit, aug_logit, edge_logit]
      else:
          logit_list = feat_list[:2]
          return [
              F.interpolate(
                  logit,
                  x.shape[2:],
                  mode="bilinear",
                  align_corners=self.align_corners,
              )
              for logit in logit_list
          ]
  
file_path: PaddleSeg/contrib/DomainAdaptation/models/deeplabv2.py
imports: import os
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddleseg.cvlibs import manager
  from paddleseg.models import layers
  from paddleseg.models.backbones import resnet_vd
  from paddleseg.utils import utils, logger
  from .gscnn import GSCNNHead
  from .backbones.resnet import ClassifierModule
label_desc: Use image node_id 2 for calling the DeepLabV2 obj's underlying member method code with example usage: obj.forward(x) and returns: list, unknown