class_docstr: Calculates the Jaccard Loss (typically used for image segmentation)
class_docstr_tok: ["Calculates","the","Jaccard","Loss","(","typically","used","for","image","segmentation",")"]
code: def __call__(self, inputs, y_pred, y_true, is_val):
      N = y_pred.size(0) * y_pred.size(2) * y_pred.size(3)
      if not self.run_on_val_only or (is_val and self.run_on_val_only):
          # self.jaccard.update(lovaszloss(y_pred, y_true.data).data[0], N)     # changed after pytorch 0.4
          self.jaccard.update(lovaszloss(y_pred, y_true).item(), N)
          return self.jaccard.avg
      else:
          return -1337.0
  
imports: import torch
  from .utils import th_matrixcorr
  from .meters.averagemeter import AverageMeter
  from .callbacks import Callback
  from .losses import lovaszloss, hingeloss, dice_coeff
label_desc: Use image node_id 3 for calling the JaccardLossMetric obj's underlying member method code with example usage: obj.__call__(inputs, y_pred, y_true, is_val) and returns: self, unknown