📅  最后修改于: 2022-03-11 14:45:16.460000             🧑  作者: Mango
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"])