raghakot / keras-vis

Neural network visualization toolkit for keras
https://raghakot.github.io/keras-vis
MIT License
2.98k stars 664 forks source link

AttributeError: Layer output has multiple inbound nodes #75

Open pau557 opened 6 years ago

pau557 commented 6 years ago

I am trying to do activation maximization in my Keras neural network.

My network is very simple.

I would like to do activation-maximization to visualize what inputs activate a particular neuron in the output layer. With layer_idx=-1 and filter_indices=neuron_index :

max_input = visualize_activation(model, layer_idx, filter_indices,input_range = (0., 1.))

returns me

AttributeError: Layer output has multiple inbound nodes, hence the notion of "layer output" is ill-defined. Use `get_output_at(node_index)` instead.

Thank you.

raghakot commented 6 years ago

That's interesting. Do you have some code for me to reproduce this? Could be a keras compatibility thing. Are you using latest keras?