raghakot / keras-vis

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

apply_modifications(model) BUG, Type ERROR #72

Open King-Of-Knights opened 6 years ago

King-Of-Knights commented 6 years ago

Hi, There! Thanks for your great job! It help my research in GAN. But I confront a problem when I try to visualization the convolution layer in the discriminator. Actually, I found this when I try to apply the example code in my discriminator

My discriminator structure is this:

`

`

Then I use the code in the example: ` layer_idx = find_layer_idx(model, 'predictions') model.layers[layer_idx].activation = activations.linear model = apply_modifications(model) img = visualize_activation(model, layer_idx, filter_indices=[0])

`

Unluckily, I got: `

`

Everything will be fine when I remove all the LeakyReLU layer. Maybe, all the advance activation will mess up, I hope you could notice that!

Again , Thanks for your great job!!