GradCAM
GradCAM copied to clipboard
I have a question about backpropagation
https://github.com/leftthomas/GradCAM/blob/f082a578e6dff8a5c5bb54bcc104d11c57758cd3/gradcam.py#L36
classes = F.sigmoid(feature) #feature shape=[1,1], classes shape=[1,1]
one_hot, _ = classes.max(dim=-1) # one_hot shape=[1]
self.model.zero_grad()
one_hot.backward()
This one_hot
is not the one hot label, I don't know it is correct or not,
In my experiment, there is a class without any activation hot map. Did you know why? Thanks