adityac94 / Grad_CAM_plus_plus

A generalized gradient-based CNN visualization technique
284 stars 56 forks source link

Question about Equation 17 in the paper #3

Open chuong98 opened 5 years ago

chuong98 commented 5 years ago

Hi, it seems to me that you can simplify the equation Equ 17 by dividing both numerator and denominator by (dS/dA)^2, to get :

alpha = 1/(2 + sum(A_ab)*(dS/dA)) if dS/dA !=0.

else: alpha = 0

Is this correct? Thanks.

Also, is there any restriction to use the exponential function. For example, If my output layer uses softmax or sigmoid, can I still use Yc = exp(Sc)?

adityac94 commented 5 years ago

You can't divide by infinitesimals. That does not make sense

chuong98 commented 5 years ago

No, taking the limit when dS/dA converges to 0, alpha converges to 0. Otherwise, you can divide it.