pytorch-grad-cam
pytorch-grad-cam copied to clipboard
A weird thing about the gradient for each channel.
trafficstars
I have printed out the gradient of feature map of one layer. However, I find a weird thing that the elements in each channel hold the same in all locations. I have written some codes to print out the gradient matrix of the layer4 of ResNet50. Basically speaking, the gradients of one channel in different locations should be different.
The result is shown below. I have tried some different inputs but it still doesn't work.
Looking forward to your reply.