-
Notifications
You must be signed in to change notification settings - Fork 2.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
Add InceptionV1 (GoogLeNet) model #59
base: master
Are you sure you want to change the base?
Conversation
This typo is already fixed in the later commit |
Thank you for writing this model! There is a small error: "TypeError: _obtain_input_shape() got an unexpected keyword argument 'include_top' " due to the updated syntax of Keras. 'include_top' is not used anymore, and should be substituted with 'require_flatten' |
Hi @mdda, Why is branch 2b 1x1 followed by 3x3, it should be 5x5 according to the paper, right? |
@deltadu Caffe model implemented it according to the paper: |
Is there any reason this has not been merged or made available to keras.applications? I feel this might be useful for some research, even considering the fact that InceptionV1 may be seen as outdated 🤔 |
Even if InceptionV1 is an old model, it can still be useful for some research work. |
Seconded. Here's some work we did with exactly this model, thanks @mdda! https://users.renyi.hu/~daniel/lucid/ |
By the way, @mdda you should mention that the model weights come from the slim reimplementation of Inception V1. |
Do you think it's good to be merged? If so, let's do it! 😉 |
Looking at the accuracy vs size vs FLOPs graph makes it clear why GoogLeNet is commonly sought as a standard model in Keras.
This PR includes an implementation in Keras of the GoogLeNet model that is a cleaner (refactored) version of the TensorFlow-slim model zoo model.
Tests show that the results at each layer are identical throughout the networks, and the weights provided in the TensorFlow-slim model zoo can be copied over cleanly. Using the Keras implementation, with the tf-slim weights loaded, I've then saved off the model_weights as Keras .h5 files. If this PR is approved, it would be great to have the weights stored somewhere other than my servers...
If you'd like to see the 'workings' of transferring the model contents over, please see this notebook.
One issue that I'd like some guidance on is how you'd like to handle the 1001-classes output by this model (there's an additional background class0). At the moment, I've left it in (as in the original). However, it could be modified to fall into line with the other models here by shifting over the logits layer weights (and reducing the number of output classes to 1000).