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
0a2bea47
Commit
0a2bea47
authored
May 11, 2022
by
Sylvain Gugger
Browse files
Fix repo consistency
parent
0645b07d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
src/transformers/models/bigbird_pegasus/configuration_bigbird_pegasus.py
...s/models/bigbird_pegasus/configuration_bigbird_pegasus.py
+2
-1
No files found.
src/transformers/models/bigbird_pegasus/configuration_bigbird_pegasus.py
View file @
0a2bea47
...
@@ -349,8 +349,9 @@ class BigBirdPegasusOnnxConfig(OnnxSeq2SeqConfigWithPast):
...
@@ -349,8 +349,9 @@ class BigBirdPegasusOnnxConfig(OnnxSeq2SeqConfigWithPast):
self
.
_config
.
hidden_size
//
num_encoder_attention_heads
,
self
.
_config
.
hidden_size
//
num_encoder_attention_heads
,
)
)
mask_dtype
=
common_inputs
[
"attention_mask"
].
dtype
common_inputs
[
"attention_mask"
]
=
torch
.
cat
(
common_inputs
[
"attention_mask"
]
=
torch
.
cat
(
[
common_inputs
[
"attention_mask"
],
torch
.
ones
(
batch
,
past_key_values_length
)],
dim
=
1
[
common_inputs
[
"attention_mask"
],
torch
.
ones
(
batch
,
past_key_values_length
,
dtype
=
mask_dtype
)],
dim
=
1
)
)
common_inputs
[
"past_key_values"
]
=
[
common_inputs
[
"past_key_values"
]
=
[
(
torch
.
zeros
(
past_shape
),
torch
.
zeros
(
past_shape
))
for
_
in
range
(
num_encoder_layers
)
(
torch
.
zeros
(
past_shape
),
torch
.
zeros
(
past_shape
))
for
_
in
range
(
num_encoder_layers
)
...
...
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