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
f42d9dcc
"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "9b90810558460f971d5fa1c7abb814879f295ead"
Unverified
Commit
f42d9dcc
authored
Jul 15, 2021
by
Lysandre Debut
Committed by
GitHub
Jul 15, 2021
Browse files
Patch T5 device test (#12742)
parent
370be9cc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
tests/test_modeling_t5.py
tests/test_modeling_t5.py
+1
-1
No files found.
tests/test_modeling_t5.py
View file @
f42d9dcc
...
@@ -802,7 +802,7 @@ class T5ModelIntegrationTests(unittest.TestCase):
...
@@ -802,7 +802,7 @@ class T5ModelIntegrationTests(unittest.TestCase):
model
.
config
.
do_sample
=
False
model
.
config
.
do_sample
=
False
tokenizer
=
T5Tokenizer
.
from_pretrained
(
"t5-small"
)
tokenizer
=
T5Tokenizer
.
from_pretrained
(
"t5-small"
)
input_ids
=
tokenizer
(
"summarize: Hello there"
,
return_tensors
=
"pt"
).
input_ids
input_ids
=
tokenizer
(
"summarize: Hello there"
,
return_tensors
=
"pt"
).
input_ids
.
to
(
torch_device
)
sequences
=
model
.
generate
(
input_ids
)
sequences
=
model
.
generate
(
input_ids
)
...
...
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