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
3ccff0d4
Unverified
Commit
3ccff0d4
authored
Jun 22, 2022
by
Kyungmin Lee
Committed by
GitHub
Jun 21, 2022
Browse files
Remove duplicate code (#17708)
parent
26a6a426
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
src/transformers/models/t5/modeling_t5.py
src/transformers/models/t5/modeling_t5.py
+1
-2
No files found.
src/transformers/models/t5/modeling_t5.py
View file @
3ccff0d4
...
...
@@ -1408,8 +1408,7 @@ class T5Model(T5PreTrainedModel):
)
hidden_states
=
encoder_outputs
[
0
]
if
self
.
model_parallel
:
torch
.
cuda
.
set_device
(
self
.
decoder
.
first_device
)
# Set device for model parallelism
if
self
.
model_parallel
:
torch
.
cuda
.
set_device
(
self
.
decoder
.
first_device
)
...
...
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