Tune in to the first Women in ML Symposium this Tuesday, October 19 at 9am PST Register now


TensorFlow 2 version View source on GitHub

Computes the squared hinge loss between y_true and y_pred.

y_true The ground truth values. y_true values are expected to be -1 or 1. If binary (0 or 1) labels are provided we will convert them to -1 or 1.
y_pred The predicted values.

Tensor with one scalar loss entry per sample.