class_docstr: The UPerNet implementation based on PaddlePaddle.
  
  The original article refers to
  Tete Xiao, et, al. "Unified Perceptual Parsing for Scene Understanding"
  (https://arxiv.org/abs/1807.10221).
  
  Args:
      num_classes (int): The unique number of target classes.
      backbone (Paddle.nn.Layer): Backbone network, currently support Resnet50/101.
      backbone_indices (tuple): Four values in the tuple indicate the indices of output of backbone.
      channels (int): The channels of inter layers. Default: 512.
      enable_auxiliary_loss (bool, optional): A bool value indicates whether adding auxiliary loss. Default: False.
      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.
      dropout_prob (float): Dropout ratio for upernet head. Default: 0.1.
      pretrained (str, optional): The path or url of pretrained model. Default: None.
class_docstr_tok: ["The","UPerNet","implementation","based","on","PaddlePaddle",".","The","original","article","refers","to","Tete","Xiao",",","et",",","al",".","``","Unified","Perceptual","Parsing","for","Scene","Understanding","''","(","https",":","\/\/arxiv.org\/abs\/1807.10221",")",".","Args",":","num_classes","(","int",")",":","The","unique","number","of","target","classes",".","backbone","(","Paddle.nn.Layer",")",":","Backbone","network",",","currently","support","Resnet50\/101",".","backbone_indices","(","tuple",")",":","Four","values","in","the","tuple","indicate","the","indices","of","output","of","backbone",".","channels","(","int",")",":","The","channels","of","inter","layers",".","Default",":","512.","enable_auxiliary_loss","(","bool",",","optional",")",":","A","bool","value","indicates","whether","adding","auxiliary","loss",".","Default",":","False",".","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",".","dropout_prob","(","float",")",":","Dropout","ratio","for","upernet","head",".","Default",":","0.1.","pretrained","(","str",",","optional",")",":","The","path","or","url","of","pretrained","model",".","Default",":","None","."]
code: def __init__(
      self,
      num_classes,
      backbone,
      backbone_indices,
      channels=512,
      enable_auxiliary_loss=False,
      align_corners=False,
      dropout_prob=0.1,
      pretrained=None,
  ):
      super().__init__()
      self.backbone = backbone
      self.backbone_indices = backbone_indices
      self.in_channels = [
          self.backbone.feat_channels[i] for i in backbone_indices
      ]
      self.align_corners = align_corners
      self.pretrained = pretrained
      self.enable_auxiliary_loss = enable_auxiliary_loss
  
      fpn_inplanes = [
          self.backbone.feat_channels[i] for i in backbone_indices
      ]
      self.head = UPerNetHead(
          num_classes=num_classes,
          fpn_inplanes=fpn_inplanes,
          dropout_prob=dropout_prob,
          channels=channels,
          enable_auxiliary_loss=self.enable_auxiliary_loss,
      )
      self.init_weight()
  
file_path: PaddleSeg/paddleseg/models/upernet.py
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddleseg import utils
  from paddleseg.cvlibs import manager
  from paddleseg.models import layers
label_desc: Use image node_id 1 to create a new UPerNet object from inherited base classes: nn with example: obj = UPerNet(num_classes, backbone, backbone_indices, channels, enable_auxiliary_loss, align_corners, dropout_prob, pretrained)