View source on GitHub |
Computes the Huber loss between y_true
& y_pred
.
Inherits From: Loss
tf.keras.losses.Huber(
delta=1.0,
reduction='sum_over_batch_size',
name='huber_loss'
)
Used in the notebooks
Used in the tutorials |
---|
Formula:
for x in error:
if abs(x) <= delta:
loss.append(0.5 * x^2)
elif abs(x) > delta:
loss.append(delta * abs(x) - 0.5 * delta^2)
loss = mean(loss, axis=-1)
See: Huber loss.
Methods
call
call(
y_true, y_pred
)
from_config
@classmethod
from_config( config )
get_config
get_config()
__call__
__call__(
y_true, y_pred, sample_weight=None
)
Call self as a function.