-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add attention scores of the vit encoder as an additional return value #2192
Add attention scores of the vit encoder as an additional return value #2192
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Dennis-Rall thanks for putting this change together.
Are there any speed implications with outputting attentions?
If so (or if you aren't sure), I suggest that we add this as a parameter in the constructor of the encoder such that this parameter would be configurable.
Please let me know if what I'm requesting is not clear.
@justinxzhao I don't know how this affects speed, but I think it's definitely a good idea to add this as a configurable parameter. |
f0178b8
to
4881dbf
Compare
Are the failing hyperopt tests a result of my changes? |
Nope! Tests look good, thanks for the PR -- merging. |
…#2192) * Add returning of attention scores in the vit encoder * Add output_attentions as a configurable parameter
This adds the vit's attention scores as return values.