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 get the high attention regions of a given sequence. #104

Open
ytye2010 opened this issue May 18, 2023 · 0 comments
Open

How to get the high attention regions of a given sequence. #104

ytye2010 opened this issue May 18, 2023 · 0 comments

Comments

@ytye2010
Copy link

I want to extract those high attention regions for some given sequences. I have try #11 to get the last embedding vector for each token.
After take their means, I find some values are negative. Is it right? And how to compare these values? Larger those absolute values, higher attention?
The following is my try for your example in #11 using 6-new-12w-0 downloaded from this github.
sequence = "AATCTA ATCTAG TCTAGC CTAGCA"
output[0][0].mean(1) = [0.0017, -0.0006, -0.0032, -0.0047, 0.0022, -0.0069]
As my understand, the first 0.0017 and last -0.0069 stand for [CLS] and [SEP]. Right?

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

1 participant