code: def __init__(self, per_image=False, ignore_index=255, weighted=None):
      super(LovaszSoftmax, self).__init__()
      self.lovasz_softmax = lovasz_softmax
      self.per_image = per_image
      self.ignore_index = ignore_index
      self.weighted = weighted
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import torch
  import torch.nn.functional
  from torch import nn
  from torch.autograd import Variable
label_desc: Use image node_id 1 to create a new LovaszSoftmax object from inherited base classes: nn with example: obj = LovaszSoftmax(per_image, ignore_index, weighted)