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
da5bb292
Unverified
Commit
da5bb292
authored
Aug 29, 2022
by
Yih-Dar
Committed by
GitHub
Aug 29, 2022
Browse files
send model to the correct device (#18800)
Co-authored-by:
ydshieh
<
ydshieh@users.noreply.github.com
>
parent
f1fd4606
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
0 deletions
+2
-0
tests/models/speech_encoder_decoder/test_modeling_speech_encoder_decoder.py
...h_encoder_decoder/test_modeling_speech_encoder_decoder.py
+1
-0
tests/models/vision_encoder_decoder/test_modeling_vision_encoder_decoder.py
...n_encoder_decoder/test_modeling_vision_encoder_decoder.py
+1
-0
No files found.
tests/models/speech_encoder_decoder/test_modeling_speech_encoder_decoder.py
View file @
da5bb292
...
...
@@ -403,6 +403,7 @@ class EncoderDecoderMixin:
)
model
=
SpeechEncoderDecoderModel
(
encoder
=
encoder_model
,
decoder
=
decoder_model
)
model
.
to
(
torch_device
)
model
.
train
()
model
.
gradient_checkpointing_enable
()
model
.
config
.
decoder_start_token_id
=
0
...
...
tests/models/vision_encoder_decoder/test_modeling_vision_encoder_decoder.py
View file @
da5bb292
...
...
@@ -331,6 +331,7 @@ class EncoderDecoderMixin:
)
model
=
VisionEncoderDecoderModel
(
encoder
=
encoder_model
,
decoder
=
decoder_model
)
model
.
to
(
torch_device
)
model
.
train
()
model
.
gradient_checkpointing_enable
()
model
.
config
.
decoder_start_token_id
=
0
...
...
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