Answers for "how to use rmse as loss function in keras"

0

how to use rmse as loss function in keras

from keras import backend as K

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

  model.compile(optimizer = "rmsprop", loss = root_mean_squared_error, 
              metrics =["accuracy"])
Posted by: Guest on September-12-2021

Code answers related to "how to use rmse as loss function in keras"

Python Answers by Framework

Browse Popular Code Answers by Language