Attention/saliency map visualization for test images for transfer learning tutorial

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 tutorial?

Hi Mona,
I think this what you’re looking for:

The code is very clear, so you shouldn’t have troubles to adapt it to your situation. If you do, let me know.

If you’re interested in other visualizations, you should also look at this Github:

1 Like