From e8fffb09d427beb92b0a9c5a2e3721ef6d4759cd Mon Sep 17 00:00:00 2001 From: piotr6789 Date: Mon, 24 May 2021 13:14:10 +0200 Subject: [PATCH] add eval script --- pytorch-example-evaluate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytorch-example-evaluate.py b/pytorch-example-evaluate.py index f6a012a..0565d54 100644 --- a/pytorch-example-evaluate.py +++ b/pytorch-example-evaluate.py @@ -48,7 +48,7 @@ model = LogisticRegressionModel(input_dim, output_dim) pred = model(fTest) accuracy = accuracy_score(tTest, np.argmax(pred.detach().numpy(), axis = 1)) f1 = f1_score(tTest, np.argmax(pred.detach().numpy(), axis = 1), average = None) -rmse = mean_squared_error(tTest, np.argmax(pred.detach().numpy())) +rmse = mean_squared_error(tTest, pred.detach().numpy()) print(f'Accuracy: {accuracy}') print(f'F1: {f1_score}')