-
Notifications
You must be signed in to change notification settings - Fork 19.5k
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
Fix typos in additive_attention #20711
base: master
Are you sure you want to change the base?
Conversation
I observed a few typos in additive_attention
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #20711 +/- ##
==========================================
+ Coverage 81.93% 82.22% +0.29%
==========================================
Files 548 561 +13
Lines 51190 52955 +1765
Branches 7912 8205 +293
==========================================
+ Hits 41942 43544 +1602
- Misses 7310 7373 +63
- Partials 1938 2038 +100
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -33,7 +33,7 @@ class AdditiveAttention(Attention): | |||
- `query`: Query tensor of shape `(batch_size, Tq, dim)`. | |||
- `value`: Value tensor of shape `(batch_size, Tv, dim)`. | |||
- `key`: Optional key tensor of shape `(batch_size, Tv, dim)`. If | |||
not given, will use `value` for both `key` and `value`, which is | |||
not given, will use the`value` for both `key` and `value`, which is |
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.
The line you modified is now 83 characters long, which is why the code format check didn't pass. The maximum allowed length is 80.
You can rewrite it to:
not given, will use the`value` for both `key` and `value`, which is | |
not given, will use the`value` for both `key` and `value`, | |
which is the most common case. |

Modified
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.
looks good!
I observed a few typos in additive_attention