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

        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).
        
paddleseg/models/losses/lovasz_loss.py