Open MathiasKahlen opened 6 years ago
I have this same problem. Please help @raghakot
@raghakot This seems to be a popular(?) issue for novice users experimenting with transfer learning. Maybe a hotfix should be included in the main code, or perhaps some documentation? I'd be happy to help if you want to pursue this avenue.
@itsnamgyu Not just transfer learning, also when your own model consists of multiple submodels.
Hope this will get fixed soon!
I have the same issue. I managed to make it work by saving my model arch to json and loading it from there instead of sequentially assembling it. I suspect the json save cleans up the inbound node thing... anyhow it worked.
@martin-etchart Great that you got it to work! Where do you normally sequentially assemble your model? Could you share an example with what you got working? Thanks!
@martin-etchart I tried saving it to json and loading it. It did not work. A detailed explanation would help. Thanks!
[x] Check that you are up-to-date with the master branch of keras-vis. You can update with: pip install git+git://github.com/raghakot/keras-vis.git --upgrade --no-deps
[x] If running on TensorFlow, check that you are up-to-date with the latest version. The installation instructions can be found here.
[ ] If running on Theano, check that you are up-to-date with the master branch of Theano. You can update with: pip install git+git://github.com/Theano/Theano.git --upgrade --no-deps
[ ] Provide a link to a GitHub Gist of a Python script that can reproduce your issue (or just copy the script here if it is short).
I am trying to follow the attention example on my model that looks like this:
input_2 (InputLayer) (None, 150, 150, 3) 0
block1_conv1 (Conv2D) (None, 150, 150, 64) 1792
block1_conv2 (Conv2D) (None, 150, 150, 64) 36928
block1_pool (MaxPooling2D) (None, 75, 75, 64) 0
block2_conv1 (Conv2D) (None, 75, 75, 128) 73856
block2_conv2 (Conv2D) (None, 75, 75, 128) 147584
block2_pool (MaxPooling2D) (None, 37, 37, 128) 0
block3_conv1 (Conv2D) (None, 37, 37, 256) 295168
block3_conv2 (Conv2D) (None, 37, 37, 256) 590080
block3_conv3 (Conv2D) (None, 37, 37, 256) 590080
block3_pool (MaxPooling2D) (None, 18, 18, 256) 0
block4_conv1 (Conv2D) (None, 18, 18, 512) 1180160
block4_conv2 (Conv2D) (None, 18, 18, 512) 2359808
block4_conv3 (Conv2D) (None, 18, 18, 512) 2359808
block4_pool (MaxPooling2D) (None, 9, 9, 512) 0
block5_conv1 (Conv2D) (None, 9, 9, 512) 2359808
block5_conv2 (Conv2D) (None, 9, 9, 512) 2359808
block5_conv3 (Conv2D) (None, 9, 9, 512) 2359808
block5_pool (MaxPooling2D) (None, 4, 4, 512) 0
sequential_1 (Sequential) (None, 1) 2097665
but I get the following error when calling the visualize_cam method: AttributeError: Layer sequential_1 has multiple inbound nodes, hence the notion of "layer output" is ill-defined. Use
get_output_at(node_index)
instead.I have tried searching but I havn't been able to figure out how to proceed from here.
I hope you can help :)