tf.keras.losses.MeanSquaredLogarithmicError

Computes the mean squared logarithmic error between y_true and y_pred.

Inherits From: Loss

loss = square(log(y_true + 1.) - log(y_pred + 1.))

Standalone usage:

y_true = [[0., 1.], [0., 0.]]
y_pred = [[1., 1.], [1., 0.]]
# Using 'auto'/'sum_over_batch_size' reduction type.
msle = tf.keras.losses.MeanSquaredLogarithmicError()
msle(y_true, y_pred).numpy()
0.240