Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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"])
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #rmse #loss #function #keras
ADD COMMENT
Topic
Name
8+6 =