class_docstr: Multi-class Lovasz-Softmax loss.
  
  Args:
      ignore_index (int64): Specifies a target value that is ignored and does not contribute to the input gradient. Default ``255``.
      classes (str|list): 'all' for all, 'present' for classes present in labels, or a list of classes to average.
class_docstr_tok: ["Multi-class","Lovasz-Softmax","loss",".","Args",":","ignore_index","(","int64",")",":","Specifies","a","target","value","that","is","ignored","and","does","not","contribute","to","the","input","gradient",".","Default","``","255","``",".","classes","(","str|list",")",":","'all","'","for","all",",","'present","'","for","classes","present","in","labels",",","or","a","list","of","classes","to","average","."]
docstr: Forward computation.
  
  Args:
      logits (Tensor): Shape is [N, C, H, W], logits at each prediction (between -\infty and +\infty).
      labels (Tensor): Shape is [N, 1, H, W] or [N, H, W], ground truth labels (between 0 and C - 1).
docstr_tok: ["Forward","computation",".","Args",":","logits","(","Tensor",")",":","Shape","is","[","N",",","C",",","H",",","W","]",",","logits","at","each","prediction","(","between","-\\infty","and","+\\infty",")",".","labels","(","Tensor",")",":","Shape","is","[","N",",","1",",","H",",","W","]","or","[","N",",","H",",","W","]",",","ground","truth","labels","(","between","0","and","C","-","1",")","."]
code: def forward(self, logits, labels):
      r"""
      Forward computation.
  
      Args:
          logits (Tensor): Shape is [N, C, H, W], logits at each prediction (between -\infty and +\infty).
          labels (Tensor): Shape is [N, 1, H, W] or [N, H, W], ground truth labels (between 0 and C - 1).
      """
      probas = F.softmax(logits, axis=1)
      vprobas, vlabels = flatten_probas(
          probas, labels, self.ignore_index
      )
      loss = lovasz_softmax_flat(vprobas, vlabels, classes=self.classes)
      return loss
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import paddle
  from paddle import nn
  import paddle.nn.functional
  from paddleseg.cvlibs import manager
label_desc: Use image node_id 2 for calling the LovaszSoftmaxLoss obj's underlying member method code with example usage: obj.forward(logits, labels) and returns: loss