class_docstr: Hinge loss.
class_docstr_tok: ["Hinge","loss","."]
code: def __init__(self, norm="L1", reduce="mean"):
      if norm in ["L1", "L2"]:
          self.norm = norm
      else:
          raise NotImplementedError(
              "norm should be either 'L1' or 'L2'"
          )
  
      if reduce in ["mean", "no"]:
          self.reduce = reduce
      else:
          raise ValueError(
              "only 'mean' and 'no' are valid for 'reduce', but "
              "'%s' is given" % reduce
          )
  
file_path: chainer/chainer/functions/loss/hinge.py
imports: import numpy
  from chainer import backend
  from chainer.backends import cuda
  from chainer import function
  from chainer.utils import type_check
label_desc: Use image node_id 1 to create a new Hinge object from inherited base classes: function with example: obj = Hinge(norm, reduce)