-
Notifications
You must be signed in to change notification settings - Fork 19.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fine-tuning InceptionV3: High accuracy during training, low during predictions #10045
Comments
I think this is an issue that other people, especially me, encounter too. |
@SpecKROELLchen Thanks for providing the references! I confirm that using architectures without batch normalization like VGG "solves" the problem. I also found the issue #9214 which describes a similar situation. Reading more into #9965, I understand that there is no consensus among maintainers on whether this is a bug or a feature. One thing I don't get, is why on earth would you ever want to standardize differently the data in Train and Test mode when the layers are not-trainable. This does not make sense to me at all. I am using code directly taken from documentation, this ought to work. To work around the problem I tried |
@jksmither Honestly, i also don`t get it. Can you or anyone try to reproduce it with this code or find what i did wrong? |
I am trying to fine tune using Inception V3 on a dataset containing 40K images in two classes (balanced). |
I installed Keras 2.1.6 and TensorFlow 1.7 and I'm using an example straight from Keras Documentation to fine-tune an InceptionV3 on a new set of 5 classes. My code is identical to the documentation; I freeze part of the network and train the rest. The problem is that during training my accuracy is high but during predictions is extremely low.
The first thing that came in my mind was overfitting so I investigated but there are no signs of that. Then I tried using the same dataset for training and validation and to my surprise I got completely different accuracy at the end of fit() and after calling validate(). Again I'm using the same dataset and at the end of training I get 93% accuracy and immediately after validation 25%!!!
Any help will be highly appreciated!
The text was updated successfully, but these errors were encountered: