Closed wt12318 closed 1 year ago
Hey Tao,
in your case, it should be safe to simply use the sign of the class you would like to attribute as your assigned output relevance, i.e. if you would like to attribute the negative class:
with attributor:
output, relevance = attributor(test_input, torch.tensor([-1.]))
As this flip of the sign influences only the scale of the relevance, it should only flip the sign of your relevance if you use e.g. ZBox in the input layer (I think also for Flat).
Let me know in case this gives unexpected results, we have a few people working on regression models, who should be encountering the a similar problem and might know a little more in that case.
Hi,
I want to use zennit to calculate LRP relevance for Binary classification model which only one neuron in output layer, how to set the second para of attributor?