issues
search
insikk
/
Grad-CAM-tensorflow
tensorflow implementation of Grad-CAM (CNN visualization)
307
stars
103
forks
source link
bugfix. gradient of y_c w.r.t feature_map
#5
Closed
insikk
closed
6 years ago
insikk
commented
6 years ago
Use y_c (logit before softmax) for calculating target conv layer gradient
Remove unnecessary gradient normalization for target conv layer gradient
Use multi-class cross entropy loss for guided backpropagation
For VGG network, we use train_mode=False always to ensure dropout is turned off
For Resnet network, we use train_mode=True, which is default value, always to ensure consistency
There is issue when we pass train_mode=False, inference is ruined due to bad design on batch-norm layer (see
https://github.com/tensorflow/tensorflow/issues/4887
)
On summation of weighted feature map, we use zero-filled array for initial value, not one-filled array.