赞
踩
去掉自定义函数的axis=-1
def rmse(y_true, y_pred): return backend.sqrt(backend.mean(backend.square(y_pred - y_true)))model_lstm.compile(optimizer="adam", loss=rmse, metrics=[rmse])