From 4c37101547ad1ad55929c9e2a67455b58449ee0c Mon Sep 17 00:00:00 2001 From: KOSASIH Date: Sat, 11 May 2024 14:28:20 +0700 Subject: [PATCH] Create evaluation.py --- machine_learning/evaluation.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 machine_learning/evaluation.py diff --git a/machine_learning/evaluation.py b/machine_learning/evaluation.py new file mode 100644 index 0000000..ac2f9ad --- /dev/null +++ b/machine_learning/evaluation.py @@ -0,0 +1,7 @@ +import tensorflow as tf + +def evaluate_model(model, data, labels): + # Evaluate the performance of the trained model + loss, metric = model.evaluate(data, labels) + + return loss, metric