From 9188b0ff6c74560d5e766b7ede45413e690f7ff6 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 25 Jun 2024 13:37:18 +0000 Subject: [PATCH] fixing right parameters to the report. --- Power-consumption-keras/client/validate.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Power-consumption-keras/client/validate.py b/Power-consumption-keras/client/validate.py index ec1ed98..56197e2 100644 --- a/Power-consumption-keras/client/validate.py +++ b/Power-consumption-keras/client/validate.py @@ -39,17 +39,13 @@ def validate(in_model_path, out_json_path, data_path=None): model.set_weights(weights) # Evaluate - model_score = model.evaluate(x_train, y_train) + model_score_train = model.evaluate(x_train, y_train) model_score_test = model.evaluate(x_test, y_test) - y_pred = model.predict(x_test) - y_pred = np.argmax(y_pred, axis=1) # JSON schema report = { - "training_loss": model_score[0], - "training_accuracy": model_score[1], - "test_loss": model_score_test[0], - "test_accuracy": model_score_test[1], + "training_mse": model_score_train[0], + "test_mse": model_score_test[0] } # Save JSON