Using transfer learning for binary classification. I train the model using my dataset which has been split into three folders - train, test, val. Each one of these further contains the individual folders for each class.
r = model.fit_generator(
training_set,
validation_data = val_set,
epochs=5,
steps_per_epoch=len(training_set),
validation_steps=len(test_set)
)
After training I get the model saved as an h5 file.
import tensorflow as tf
from keras.models import load_model
model.save('vgg16_new_model.h5')
How do I use this to test the model on the test set?