Type MeanAbsoluteError
Namespace tensorflow.keras.losses
Parent LossFunctionWrapper
Interfaces IMeanAbsoluteError
Computes the mean of absolute difference between labels and predictions. `loss = abs(y_true - y_pred)` Usage:
Usage with the `compile` API:
Show Example
mae = tf.keras.losses.MeanAbsoluteError() loss = mae([0., 0., 1., 1.], [1., 1., 1., 0.]) print('Loss: ', loss.numpy()) # Loss: 0.75