15 lines
419 B
Python
15 lines
419 B
Python
import tensorflow as tf
|
|
import tensorflow_datasets as tfds
|
|
|
|
new_model = tf.keras.models.load_model('hdf5_models/fully trainable VGG16 base model.h5')
|
|
new_model.summary()
|
|
ds_train, ds_test = tfds.load(
|
|
'svhn_cropped',
|
|
split=['train', 'test'],
|
|
shuffle_files=True,
|
|
as_supervised=True
|
|
)
|
|
|
|
loss, acc = new_model.evaluate(ds_test, verbose=2)
|
|
print('Restored model, accuracy: {:5.2f}%'.format(100 * acc))
|