Background
While fine tuning a classification model in Keras, it printed val_acc: 0.8456
. This code was used for fine-tuning.
After fine-tuning, manually loading the trained model and predicting the valuation set, a much lower accuracy of 0.28
was received.
The following code was used for valuation:
model = load_model(MODEL_PATH)
...
img = kimage.load_img(img_path, target_size=target_size)
x = kimage.img_to_array(img)
x = np.expand_dims(x, axis=0)
x = vgg19.preprocess_input(x)
pred = model.predict(x)
Question
What might be the cause for the big discrepancy in accuracy 0.85 != 0.28
?