MzeroMiko / VMamba

VMamba: Visual State Space Models,code is based on mamba
MIT License
2.06k stars 123 forks source link

About Attention Map by VMamba #200

Open TZW-056 opened 4 months ago

TZW-056 commented 4 months ago

Thanks for your wonderful work and detailed explaining ! I already successfully run analyze/attnmap.py, but the attention map is different from that obtained by deit. I wonder to know how I can gain the attention map just like deit. 🌹

MzeroMiko commented 4 months ago

It is a good question.

But if you are using the latest repo, you will get the similar attention map like most attention-based models do.

Here's an example extracted by attnmap.py few days ago (you should get the similar results if you are correctly using attnmap.py): image while the fisrt line is about the attention in different scan routines, the second line shows the attention of $CB^\top$, the attention of $(C \odot w)(\frac{B}{w})^\top$, the attention of DeiT.