Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
022a1e9e
Unverified
Commit
022a1e9e
authored
Apr 30, 2021
by
Patrick von Platen
Committed by
GitHub
Apr 30, 2021
Browse files
make style (#11520)
parent
e0db8276
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/models/led/modeling_led.py
src/transformers/models/led/modeling_led.py
+1
-1
No files found.
src/transformers/models/led/modeling_led.py
View file @
022a1e9e
...
...
@@ -424,7 +424,7 @@ class LEDEncoderSelfAttention(nn.Module):
# matrix multiplication
# bcxd: batch_size * num_heads x chunks x 2window_overlap x head_dim
# bcyd: batch_size * num_heads x chunks x 2window_overlap x head_dim
# bcxy: batch_size * num_heads x chunks x 2window_overlap x window_overlap
# bcxy: batch_size * num_heads x chunks x 2window_overlap x
2
window_overlap
diagonal_chunked_attention_scores
=
torch
.
einsum
(
"bcxd,bcyd->bcxy"
,
(
query
,
key
))
# multiply
# convert diagonals into columns
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment