Grad_CAM_plus_plus icon indicating copy to clipboard operation
Grad_CAM_plus_plus copied to clipboard

Question about computational efficiency and numerical stability in equation (19)

Open mlerma54 opened this issue 3 years ago • 0 comments

I noticed that equation (19) in the paper:

Screenshot_from_2022-04-16_11-51-45

can be simplified by dividing numerator and denominator by the squared gradient:

Screenshot_from_2022-04-16_12-28-23

The simplified version (19") is more efficient (no powers of gradients need to be computed), and clearly more numerically stable than (19), because the powers are vulnerable to numerical over and underflow. It is also more robust for the case in which the gradients are zero (the original version becomes 0/0).

Is there any reason for using (19) instead of (19") in the computation of the alphas?

mlerma54 avatar Apr 16 '22 17:04 mlerma54