CNN / src /evaluate.py
sheethal0703's picture
Upload folder using huggingface_hub
e85e22c verified
raw
history blame contribute delete
368 Bytes
import tensorflow as tf
import numpy as np
from .data import get_class_names
def evaluate_model(model, test_data):
"""
Evaluates the model on test data.
"""
(x_test, y_test) = test_data
test_loss, test_acc = model.evaluate(x_test, y_test, verbose=2)
print(f'\nTest accuracy: {test_acc}')
return test_loss, test_acc