Closed Max-ChenFei closed 3 years ago
whoops! great! you found a typo in my program. will modify them. thx for your feed back.
p.s. the current program with the "third" same as the second still generates a meaningful map. curios how much does it affect against the output.
to be modified as third = K.exp(y_c)gradsgrads*grads
By the way, I will set K.learning_phase = 0 (for test) if the models contain dropout and batchNorm layers. because during the inference, we should ensure that the Dropout becomes the Identity layer rather than random layer. we still see Dropout but should behave like an Identity function.
thx for pointing it out. i just used it for VGG16 from keras.application that do have any dropout or batchnorms. your suggestion makes it more general for other models. would be great if you can do a pull request for the two above.
Thanks a lot.
I learned a lot from your project. Thanks a lot. I have a question about the formula line 47 in gradcamutils.py Is it should be : *third = K.exp(y_c)gradsgradsgrads**