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

Which implementation of InceptionV3 should I be using? #27

Closed
rahul003 opened this issue Mar 29, 2019 · 9 comments
Closed

Which implementation of InceptionV3 should I be using? #27

rahul003 opened this issue Mar 29, 2019 · 9 comments

Comments

@rahul003
Copy link

Hi,

Which implementation of inceptionv3 should I be using to replicate your results?
The 3 I have used did not have the names of the layers model.py is looking for.
I'd really appreciate if you can point us to the code for inception.

Thanks!

@aaossa
Copy link

aaossa commented Apr 13, 2019

Hey @rahul003 , I'm facing the same issue. Did you find an appropiate model? How did you work with this? Thanks!

PS: @jameswex @Gareth001 @BeenKim any pointers? 😓

@Gareth001
Copy link
Contributor

@aaossa I am using the keras InceptionV3 model, (from keras.applications.inception_v3 import InceptionV3). It took some time, but I got TCAV to recognize my keras model using a custom model wrapper I made. If you are interested in the keras code, I'd be happy to share. Otherwise, I can't really help, as I've little experience in pure tensorflow.

@aaossa
Copy link

aaossa commented Apr 14, 2019

Actually that would be very useful. Did you have to use custom layer names? (Different from the ones in the provided wrappers) How can you share the code? Thanks!

@BeenKim
Copy link
Contributor

BeenKim commented Apr 14, 2019 via email

@Gareth001
Copy link
Contributor

Sure, I wouldn't mind making a PR for this. However, the code is very specific to keras, and so I think it would belong in it's own notebook, perhaps called Run TCAV keras.ipynb. For now, here's a gist of what I did, and also how you can extend it to other models such as VGG16 in keras. Hopefully it helps.

https://gist.github.com/Gareth001/e600d2fbc09e690c4333388ec5f06587

@rahul003
Copy link
Author

The pre trained Inception from here worked for us. Good luck!
https://github.com/tensorflow/models/tree/master/research/slim

@jameswex
Copy link
Collaborator

@rahul003 did you have to make code changes (i.e. a new model wrapper) to use the pre-trained inception from https://github.com/tensorflow/models/tree/master/research/slim, or did the inception model wrapper included in this repo work out of the box with that model?

@BeenKim BeenKim closed this as completed Mar 10, 2020
@rehmanzafar
Copy link

Hi
I used the InceptionV3 model from the suggested link but it didn't work.

The pre trained Inception from here worked for us. Good luck! https://github.com/tensorflow/models/tree/master/research/slim

The Inception model wrapper throwing the following exceptions:

tensorflow.python.framework.errors_impl.InvalidArgumentError: Requested return tensor 'softmax:0' not found in graph def
tensorflow.python.framework.errors_impl.InvalidArgumentError: Requested return tensor 'softmax/logits:0' not found in graph def

Also, I tried the Wrapper shared by Gareth001 but it didn't work either.

https://gist.github.com/Gareth001/e600d2fbc09e690c4333388ec5f06587

Can you please suggest a solution?

Many thanks

@marisfryer
Copy link

marisfryer commented Feb 14, 2022

The Inception model wrapper throwing the following exceptions:

tensorflow.python.framework.errors_impl.InvalidArgumentError: Requested return tensor 'softmax:0' not found in graph def tensorflow.python.framework.errors_impl.InvalidArgumentError: Requested return tensor 'softmax/logits:0' not found in graph def

I am also running into this same error. Is there a resolution for this? I've tried running the InceptionV3 as my base model from from keras.applications.inception_v3 import InceptionV3 and using transfer learning with a softmax logit as output and I am still getting this exact error.

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

7 participants