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
46cc9dd2
Unverified
Commit
46cc9dd2
authored
Jul 25, 2019
by
Thomas Wolf
Committed by
GitHub
Jul 25, 2019
Browse files
Merge pull request #899 from sukuya/master
Fixed import to use torchscript flag.
parents
6219ad72
e1e2ab34
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
docs/source/torchscript.rst
docs/source/torchscript.rst
+2
-2
No files found.
docs/source/torchscript.rst
View file @
46cc9dd2
...
...
@@ -74,7 +74,7 @@ according to a ``BertConfig`` class and then saved to disk under the filename ``
..
code
-
block
::
python
from
pytorch_
pretrained_b
er
t
import
BertModel
,
BertTokenizer
,
BertConfig
from
pytorch_
transform
er
s
import
BertModel
,
BertTokenizer
,
BertConfig
import
torch
enc
=
BertTokenizer
.
from_pretrained
(
"bert-base-uncased"
)
...
...
@@ -129,4 +129,4 @@ Using the traced model for inference is as simple as using its ``__call__`` dund
..
code
-
block
::
python
traced_model
(
tokens_tensor
,
segments_tensors
)
\ No newline at end of file
traced_model
(
tokens_tensor
,
segments_tensors
)
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