Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
ca422e3d
Unverified
Commit
ca422e3d
authored
Jan 21, 2021
by
Patrick von Platen
Committed by
GitHub
Jan 21, 2021
Browse files
finish (#9721)
parent
c8ea582e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/transformers/models/t5/modeling_t5.py
src/transformers/models/t5/modeling_t5.py
+2
-2
No files found.
src/transformers/models/t5/modeling_t5.py
View file @
ca422e3d
...
...
@@ -934,9 +934,9 @@ class T5Stack(T5PreTrainedModel):
encoder_extended_attention_mask
=
encoder_extended_attention_mask
.
to
(
hidden_states
.
device
)
if
encoder_decoder_position_bias
is
not
None
:
encoder_decoder_position_bias
=
encoder_decoder_position_bias
.
to
(
hidden_states
.
device
)
if
head_mask
is
not
None
:
if
not
(
isinstance
(
head_mask
,
list
)
and
head_mask
[
0
]
is
None
)
:
head_mask
=
head_mask
.
to
(
hidden_states
.
device
)
if
encoder_head_mask
is
not
None
:
if
not
(
isinstance
(
encoder_head_mask
,
list
)
and
encoder_head_mask
[
0
]
is
None
)
:
encoder_head_mask
=
encoder_head_mask
.
to
(
hidden_states
.
device
)
if
output_hidden_states
:
all_hidden_states
=
all_hidden_states
+
(
hidden_states
,)
...
...
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