-
Notifications
You must be signed in to change notification settings - Fork 25
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
Relevance of hidden layers #2
Comments
I guess that this is actually a bit cumbersome. One way would be to break the network up into multiple It relates to this post about obtaining grads (explanations in our case) and this post about getting intermediate outputs of pretrained networks. I would be happy to discuss if there is a better way to structure this code such that similar tasks become easier. |
hey, thanks for the answer! yes, "cumbersome" is the right word here! pull request #3 gets the job done, but it's kind of hack-ish... not sure if there's a better/more elegant way to do it! |
I have merged your pull request although I never liked |
The best way would be to pass a list to fill with the trace when calling tl=[]
y_hat.backward(trace_list=tl) However, I think |
Yes, this is exactly the issue. |
Is there a simple (or simple-ish) way to obtain the relevance scores of hidden layers, i.e., what is visualized in the cell starting with "for i,l in enumerate([31,21,11,1]):" here?
https://git.tu-berlin.de/gmontavon/lrp-tutorial
The library sure computes them, but I could not find a way to recover those. Thanks!
The text was updated successfully, but these errors were encountered: