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
9c67196b
Commit
9c67196b
authored
Feb 04, 2020
by
Lysandre
Browse files
Update quickstart
parent
90ab15cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
docs/source/quickstart.md
docs/source/quickstart.md
+2
-2
No files found.
docs/source/quickstart.md
View file @
9c67196b
...
@@ -299,8 +299,8 @@ model = Model2Model.from_pretrained('fine-tuned-weights')
...
@@ -299,8 +299,8 @@ model = Model2Model.from_pretrained('fine-tuned-weights')
model
.
eval
()
model
.
eval
()
# If you have a GPU, put everything on cuda
# If you have a GPU, put everything on cuda
question_tensor
=
encoded_
question
.
to
(
'cuda'
)
question_tensor
=
question
_tensor
.
to
(
'cuda'
)
answer_tensor
=
encoded_answe
r
.
to
(
'cuda'
)
answer_tensor
=
answer_tenso
r
.
to
(
'cuda'
)
model
.
to
(
'cuda'
)
model
.
to
(
'cuda'
)
# Predict all tokens
# Predict all tokens
...
...
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