-
Notifications
You must be signed in to change notification settings - Fork 237
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
AttributeError: Layer vgg16 has multiple inbound nodes, hence the notion of "layer input" is ill-defined. Use get_input_at(node_index)
instead.
#21
Comments
My solution was not to define the model as sequential, but to add the target layer directly. The grad_cam function looks like this now:
|
@kobotschick Thanks you for your proposals, I have dealed with the problem to follow the https://github.com/vense/keras-grad-cam/blob/master/grad-cam.py |
@kobotschick One problem I had with your solution was a message that a list doesn't have an attributed called dtype. The solution was to change |
@kobotschick Where is Model() function defined? |
full grad_cam function along with import as follows:
|
For everyone who is facing the same issue: I forked this repository and fixed all errors I was facing. #27 |
The following change works for me : |
Add requirements.txt for faster environment setup. Fixes on top of https://github.com/jacobgil/keras-grad-cam (as of today, July 12th 2021): - jacobgil/keras-grad-cam#17 (comment) - jacobgil/keras-grad-cam#21 (comment)
Initial commit Add initial Grad-CAM implementation and other initial files Add requirements.txt for faster environment setup. Fixes on top of https://github.com/jacobgil/keras-grad-cam (as of today, July 12th 2021): - jacobgil/keras-grad-cam#17 (comment) - jacobgil/keras-grad-cam#21 (comment) Add modifications to add thresholding Add yapf config for vscode, move requirements.txt, and format code Fix links to show sample images in keras-grad-cam Move files src folder and modify gitignore Convert folders into packages Add preprocessing functions Remove guided backprop code from grad-cam Re-format grad-cam folder and add first version of algo Remove keras_grad_cam examples and information
Add requirements.txt for faster environment setup. Fixes on top of https://github.com/jacobgil/keras-grad-cam (as of today, July 12th 2021): - jacobgil/keras-grad-cam#17 (comment) - jacobgil/keras-grad-cam#21 (comment)
Add requirements.txt for faster environment setup. Fixes on top of https://github.com/jacobgil/keras-grad-cam (as of today, July 12th 2021): - jacobgil/keras-grad-cam#17 (comment) - jacobgil/keras-grad-cam#21 (comment)
when I run the code ,the following question appeared
AttributeError: Layer vgg16 has multiple inbound nodes, hence the notion of "layer input" is ill-defined. Use
get_input_at(node_index)
instead.i change it as
gradient_function = K.function([model.layers[0].get_input_at(1)], [conv_output, grads])
but it also does not work
i do not understand what the function want? any help will be appreciated.
The text was updated successfully, but these errors were encountered: