Skip to content
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

Extremely low accuracy after finetuning InceptionV3 (not overfitting) #10214

Closed
gkarampatsakis opened this issue May 16, 2018 · 2 comments
Closed

Comments

@gkarampatsakis
Copy link

Hello everyone!

I'm using Keras 2.1.6 and TF 1.8. I want to fine-tune the pre-trained InceptionV3 on a new set of classes as shown here: https://keras.io/applications/

My code is literally copy-paste from the documentation. While doing that, I noticed that the accuracy on my training dataset is very high while the one on the validation set is very low. Immediately I suspected over-fitting but after wasting several hours I could not find anything. Then I tried to fit/evaluate on the same dataset. To my surprise the accuracy reported by fit() was 87.2% while the one reported by evaluate() was 62.9% on the SAME dataset.

How is this possible? Is there a bug or something? I tried also Keras 2.1.5 and 2.1.4 but I get the same problem. Am I doing something wrong? I following the documentation.

@gkarampatsakis
Copy link
Author

After digging through the issues and googling around I found out that this is related to Batch Normalization. I tried @datumbox's temporary fix (described at #9214) and now the accuracy on training/validation is the same.

@Dref360 @farizrahman4u @taehoonlee @fchollet Any plans to fix this on master? It's really annoying!

@gkarampatsakis
Copy link
Author

Also it seems there was a pull-request (#9965) to fix this problem but it was not merged. Anyone know what's the status of that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants