class_docstr: Calculates the Hinge Loss (typically used for image segmentation)
class_docstr_tok: ["Calculates","the","Hinge","Loss","(","typically","used","for","image","segmentation",")"]
docstr: :param is_binary: (default: True) Whether this is binary segmentation.
  :param run_on_val_only: (default: False) Whether we only want this to execute during evaluation loop
code: def __init__(self, run_on_val_only=False):
      """
      :param is_binary: (default: True) Whether this is binary segmentation.
      :param run_on_val_only: (default: False) Whether we only want this to execute during evaluation loop
      """
      self._name = "hinge_loss"
      self.run_on_val_only = run_on_val_only
      self.hinge = AverageMeter()
  
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 1 to create a new HingeLossMetric object from inherited base classes: Metric with example: obj = HingeLossMetric(run_on_val_only)