Act fast, special offers end soon! Up to $294 is savings when you get Premium today.
Get offer codes

Why MSE loss function isn't the square of RMSE metric?

I have trained a CNN. The loss function MSE and the metric function RMSE are defined as below.

def root_mean_squared_error(y_true, y_pred):
            return K.sqrt(K.mean(K.square(y_pred - y_true), axis=-1)) 

model.compile(loss=tf.keras.losses.mse,
            optimizer=tf.optimizers.RMSprop(0.01),
            metrics=[root_mean_squared_error])

If the MSE is defined as the square of RMSE, why I didn’t get that in my results ?

Epoch 2/120
50/50 [=============]-5s 103ms/step - loss: 260839.0625 - root_mean_squared_error: 355.3231 - val_loss: 195526.6562 - val_root_mean_squared_error: 298.9407

In other words, why 355.32312 isn’t equal to 260839.0625 ?

These should help clarify this -

1 Like

Thank you ! That was helpful