Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to visualize the cls token in VTN ? #17

Closed
baba-bug opened this issue Jan 5, 2023 · 2 comments
Closed

How to visualize the cls token in VTN ? #17

baba-bug opened this issue Jan 5, 2023 · 2 comments

Comments

@baba-bug
Copy link

baba-bug commented Jan 5, 2023

Hello,

Your work on VTN is excellent, it inspires me a lot.
In the paper, you said you visualize the [CLS] token attention weights. I am trying to visualize it , but I struggled to understand the meaning of the cls token. I now can get the cls token before mlp which shapes ( batch size * 768 ), how can I visualize it?

I would appreciate it if you could tell me. If you can help me with a simple example, that would be great.

Thank you!

@DaniNem
Copy link

DaniNem commented Jan 11, 2023

Hey,

We use the cls token attention weight, as it is the only token with global attention.
Also, it is worth mentioning that we used one layer Longformer for that purpose.

Best,
Daniel

@baba-bug
Copy link
Author

baba-bug commented Feb 6, 2023

Dear Daniel:

Thanks a lot, I finally got the attention weight. Your reply helps me a lot.

I wish you all the best

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants