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

Visualizing Activation Layers #74

Closed
sidgan opened this issue Sep 1, 2019 · 2 comments · Fixed by #75
Closed

Visualizing Activation Layers #74

sidgan opened this issue Sep 1, 2019 · 2 comments · Fixed by #75

Comments

@sidgan
Copy link

sidgan commented Sep 1, 2019

Visualizations of the Activation Layers should happen after a convolution layer, and not the activation layer itself.

In https://github.com/sicara/tf-explain/blob/master/examples/core/activations_visualization.py#L20

 grid = explainer.explain(data, model, ['activation_6'])

needs to be replaced by

 grid = explainer.explain(data, model, ['conv_1']) 

Happy to send a pull request for the same.

@RaphaelMeudec
Copy link
Collaborator

RaphaelMeudec commented Sep 2, 2019

Indeed, but this could have no effect if the activation is defined inside the Conv2D layer. If you run the below snippet, first conv output is the output of the activation layer. Second one is the output of the convolution itself.

Maybe a more appropriate line would be grid = explainer.explain(data, model, ['target_layer'])? What do you think?

Thanks for your feedback by the way!

@sidgan
Copy link
Author

sidgan commented Sep 3, 2019

Agree with your suggestion.

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

Successfully merging a pull request may close this issue.

2 participants