tf.keras.losses.huber

Computes Huber loss value.

For each value x in error = y_true - y_pred:

loss = 0.5 * x^2                  if |x| <= d
loss = 0.5 * d^2 + d * (|x| - d)  if |x| > d

where d is delta. See: https://en.wikipedia.org/wiki/Huber_loss

y_true tensor of true targets.
y_pred tensor of predicted targets.
delta A float, the point where the Huber loss function changes from a quadratic to linear.

Tensor with one scalar loss entry per sample.