tf.keras.losses.squared_hinge
View source on GitHub |
Computes the squared hinge loss between y_true
and y_pred
.
tf.keras.losses.squared_hinge( y_true, y_pred )
Args | |
---|---|
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. |
Returns | |
---|---|
Tensor with one scalar loss entry per sample. |
© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/losses/squared_hinge