class_docstr: Computes the categorical hinge metric between `y_true` and `y_pred`.
  
  Args:
      name: (Optional) string name of the metric instance.
      dtype: (Optional) data type of the metric result.
  
  Standalone usage:
  >>> m = keras.metrics.CategoricalHinge()
  >>> m.update_state([[0, 1], [0, 0]], [[0.6, 0.4], [0.4, 0.6]])
  >>> m.result().numpy()
  1.4000001
  >>> m.reset_state()
  >>> m.update_state([[0, 1], [0, 0]], [[0.6, 0.4], [0.4, 0.6]],
  ...                sample_weight=[1, 0])
  >>> m.result()
  1.2
class_docstr_tok: ["Computes","the","categorical","hinge","metric","between","`","y_true","`","and","`","y_pred","`",".","Args",":","name",":","(","Optional",")","string","name","of","the","metric","instance",".","dtype",":","(","Optional",")","data","type","of","the","metric","result",".","Standalone","usage",":",">",">",">","m","=","keras.metrics.CategoricalHinge","(",")",">",">",">","m.update_state","(","[","[","0",",","1","]",",","[","0",",","0","]","]",",","[","[","0.6",",","0.4","]",",","[","0.4",",","0.6","]","]",")",">",">",">","m.result","(",")",".numpy","(",")","1.4000001",">",">",">","m.reset_state","(",")",">",">",">","m.update_state","(","[","[","0",",","1","]",",","[","0",",","0","]","]",",","[","[","0.6",",","0.4","]",",","[","0.4",",","0.6","]","]",",","...","sample_weight=","[","1",",","0","]",")",">",">",">","m.result","(",")","1.2"]
code: def get_config(self):
      return {"name": self.name, "dtype": self.dtype}
  
file_path: keras/keras/metrics/hinge_metrics.py
imports: from keras.api_export import keras_export
  from keras.losses.losses import categorical_hinge
  from keras.losses.losses import hinge
  from keras.losses.losses import squared_hinge
  from keras.metrics import reduction_metrics
label_desc: Use image node_id 2 for calling the CategoricalHinge obj's underlying member method code with example usage: obj.get_config() and returns: dict