Although [1]} empirically shows that the heuristic GAP step can help improve the performance of object localization, this step makes the meaning of the generated map unclear. By removing this step, which means combining the gradient and feature directly as \(A_{i,j,k}\frac{\partial S_{c}}{\partial A_{i,j,k}}\) , the modified version would generate the same result as activation decomposition for flattened and GMP based architectures. As for the metric learning architecture discussed in Section REF , the Grad-CAM map of query image is written as (the detailed derivation is presented in Appendix ):
\(\begin{split}GradCAM_{i,j} =&\frac{1}{Z}\left(\frac{\partial (E^{q}/|E^{q}|)}{\partial E^{q}}GAP(W^{q}) A^{q}_{i,j}\right) \\& \cdot \underbrace{\left(\sum _{x,y}W^{r}_{x,y}A^{r}_{x,y}+B^{r}\right)}_{E^{r}}.\end{split}\) 
