Visualize attention maps for ViT
apoorvasafai opened this issue · 1 comments
apoorvasafai commented
Hi
I am using ViT for a 2D image classification task. How do I visualize the attention maps after changing save_attn=True while training the ViT model.
Thanks
KumoLiu commented
Hi @apoorvasafai, you can get it by using:
net.blocks[0].attn.att_mat
Hope it helps, thanks.