What is class_idx in __call__() ??
edwardcho opened this issue ยท 6 comments
Hello sir,
I want to display heat-map for my classification task.
So i found your library.
What is class_idx of call()??
(I think that it is class index of top-1)
And,
Using my datasets,
I met nan.
In compute_cam() of core.py
My result of torch.nansum has all < 0.
Then F.relu return all 0.
So, in normalization, it return nan.
Is this nornal??
If not, what should i change in my data??
Thanks.
Edward cho
Hi there ๐
a CAM is relative to the class output of the model, not necessarily the top 1. So this arg needs to be an integer in the range of (0, N - 1) where N is the number of output classes ;)
Regarding your error, I would need a minimal runnable snippet to reproduce as I'm not sure what you mean here :/ For issues, it's better to fill the bug report template next time please ๐
Cheers โ๏ธ
Hi there ๐
a CAM is relative to the class output of the model, not necessarily the top 1. So this arg needs to be an integer in the range of (0, N - 1) where N is the number of output classes ;)
Regarding your error, I would need a minimal runnable snippet to reproduce as I'm not sure what you mean here :/ For issues, it's better to fill the bug report template next time please ๐
Cheers โ๏ธ
Hello sir.
As you know, the CAM is for checking of decision of deep learning tasks, i think.
So i want to use evidence of top-1 on classification task.
If so, class-idx should be class index of top-1. Right??
Thanks,
Edward cho
If so, class-idx should be class index of top-1. Right??
As mentioned above, yes you can!
However regarding your error, I'll need a runnable snippet to reproduce this behaviour ๐
Any update @edwardcho ? :)
Hello @edwardcho ๐
Mind providing a minimal script to reproduce the behavior you described? ๐
Otherwise I'll close the issue since I cannot do anything about this without more details ๐