I am interested in visualizing attention map of test images and dropping all of the attention map after the experiment is done into a separate folder. Can you please give hints what are the part of codes that can change for this purpose?
Additionally, how can I incorporate something like GradCam into this https://pytorch.org/tutorials/beginner/transfer_learning_tutorial.html 77 tutorial?

  
      
      arXiv.org
  
  
    

Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization 64

We propose a technique for producing "visual explanations" for decisions from
a large class of CNN-based models, making them more transparent. Our approach -
Gradient-weighted Class Activation Mapping (Grad-CAM), uses the gradients of
any target...