File size: 368 Bytes
e85e22c
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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