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

lrp for regression #2

Closed
bmayaci opened this issue Apr 23, 2022 · 1 comment
Closed

lrp for regression #2

bmayaci opened this issue Apr 23, 2022 · 1 comment

Comments

@bmayaci
Copy link

bmayaci commented Apr 23, 2022

Dear @KaiFabi ,

Thanks for this implementation. I think it is super cool! Can your implementation be used for the regression problem where there is only one output neuron representing a numerical value. How should I change the implementation to do this, if possible?

Looking forward to hearing your comment on this!

Thanks

@kaifishr
Copy link
Owner

kaifishr commented Apr 23, 2022

Hi @bmayaci

I have never tried relevance propagation for a regression task. At the moment, however, I don't see why it shouldn't work.

In lrp.py, line 104, you probably don't need the softmax function when working on a regression problem:

relevance = torch.softmax(activations.pop(0), dim=-1) # Unsupervised

In this case relevance = activations.pop(0) should be enough.

@kaifishr kaifishr closed this as completed May 4, 2022
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

No branches or pull requests

2 participants