| 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 | |