When I use model.predict_generator()
on my test_set (images)
I am getting a different prediction and when I use mode.predict()
on the same test_Set
I am getting a different set of predictions.
For using model.predict_generator
I followed the below steps to create a generator:
Imagedatagenerator
(no arguments here) and used flow_from_directory withshuffle = False.
- There are no augmentations nor preprocessing of
images(normalization,zero-centering etc)
while training the model.
I am working on a binary classification problem involving dogs and cats (from kaggle).On the test set, I have 1000 cat images.
and by using model.predict_generator()
I am able to get 87% accuracy()
i.e 870 images are classified correctly.
But while using model.predict I am getting 83% accuracy.
This is confusing because both should give identical results right? Thanks in advance :)