Search code examples
kerasmetricsloss-functionmean-square-error

Difference between metric and loss MSE in tf.keras


What are the differences between the mean squared error function in tf.keras.metrics.mean_squared_error and tf.keras.losses.MeanSquaredError?


Solution

  • The former is used as an indicator, and not used in the backpropagation calculation for updating the weights. It is used if you use other function as a loss function, but at the same time you also want to know the MSE value.