how can i adapt pytorch-grad-cam to Transformers VQA Models?

Author: V2LLAINCreated Oct 3, 2024Updated Mar 9, 2026

I'm very interesting on your GradCAM code, so i'd like to adapt your code for VQA Tasks.

So i chose InternVL2-8B Model(internvl-chat model) which can be utilize for a VQA Tasks.

But, in your code, there's no other ways for adapt GradCAM code for VLMs(Visual Language Models), which includes VQA Tasks.

So, if you have any solution of this, i wanna get some advice of it. thank you.

Source: jacobgil/pytorch-grad-cam