class_docstr: Rank hinge loss.
  
  Examples:
      >>> from keras import backend as K
      >>> x_pred = K.variable(np.array([[1.0], [1.2], [0.8], [1.4]]))
      >>> x_true = K.variable(np.array([[1], [0], [1], [0]]))
      >>> expect = ((1.0 + 1.2 - 1.0) + (1.0 + 1.4 - 0.8)) / 2
      >>> expect
      1.4
      >>> loss = K.eval(RankHingeLoss(num_neg=1, margin=1.0)(x_true, x_pred))
      >>> np.isclose(loss, expect)
      True
class_docstr_tok: ["Rank","hinge","loss",".","Examples",":",">",">",">","from","keras","import","backend","as","K",">",">",">","x_pred","=","K.variable","(","np.array","(","[","[","1.0","]",",","[","1.2","]",",","[","0.8","]",",","[","1.4","]","]",")",")",">",">",">","x_true","=","K.variable","(","np.array","(","[","[","1","]",",","[","0","]",",","[","1","]",",","[","0","]","]",")",")",">",">",">","expect","=","(","(","1.0","+","1.2","-","1.0",")","+","(","1.0","+","1.4","-","0.8",")",")","\/","2",">",">",">","expect","1.4",">",">",">","loss","=","K.eval","(","RankHingeLoss","(","num_neg=1",",","margin=1.0",")","(","x_true",",","x_pred",")",")",">",">",">","np.isclose","(","loss",",","expect",")","True"]
docstr: `margin` getter.
docstr_tok: ["`","margin","`","getter","."]
code: def margin(self):
      """`margin` getter."""
      return self._margin
  
file_path: MatchZoo/matchzoo/losses/rank_hinge_loss.py
imports: import numpy
  import tensorflow
  from keras import layers, backend
  from keras.losses import Loss
  from keras.utils import losses_utils
label_desc: Use image node_id 4 for calling the RankHingeLoss obj's underlying member method code with example usage: obj.margin() and returns: self