In the lab, data generator read images and resize them:
target_size=(300, 300), # All images will be resized to 300x300
A the same way, at the prediction time, a resizing is applied:
img = load_img(path, target_size=(300, 300))
But can this kind of image preprocessing introduce some sort of distortion into the image causing poor performance in both training and prediction?