-
Notifications
You must be signed in to change notification settings - Fork 489
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
AttributeError: 'NoneType' object has no attribute 'relevance_input' #1238
Comments
I had same problem 😬😬 |
Hello there, do you set the rules beforhand? If you are using custom layers, this might be an issue. From docs - |
Thanks for the quick reply. |
Hey, I used composite LRP from this paper for VGG-16. Both Gamma and Epsilon rule are part of |
I'm using LRP for my resnet model by loading in .pth file. However, it raises "AttributeError: 'NoneType' object has no attribute 'relevance_input'" while I'm trying to apply the following code.
lrp = LRP(down_model)
attribution = lrp.attribute((use1, use2), target = np.argmax(dataset[a][-1]))
I've checked the type of everything is the same as the tutorial you provided, the only difference is the model, but the model works well when I apply it to Saliency as the following code:
saliency = Saliency(down_model)
attribution = saliency.attribute((use1, use2), target = np.argmax(dataset[a][-1]))
Thanks in advance!
The text was updated successfully, but these errors were encountered: