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
35c52f2f
Unverified
Commit
35c52f2f
authored
Jul 25, 2019
by
Sukuya
Committed by
GitHub
Jul 25, 2019
Browse files
Update torchscript.rst
Import fixed to pytorch_transformers else torchscript flag can't be used.
parent
067923d3
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 @
35c52f2f
...
@@ -74,7 +74,7 @@ according to a ``BertConfig`` class and then saved to disk under the filename ``
...
@@ -74,7 +74,7 @@ according to a ``BertConfig`` class and then saved to disk under the filename ``
..
code
-
block
::
python
..
code
-
block
::
python
from
pytorch_
pretrained_b
er
t
import
BertModel
,
BertTokenizer
,
BertConfig
from
pytorch_
transform
er
s
import
BertModel
,
BertTokenizer
,
BertConfig
import
torch
import
torch
enc
=
BertTokenizer
.
from_pretrained
(
"bert-base-uncased"
)
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
...
@@ -129,4 +129,4 @@ Using the traced model for inference is as simple as using its ``__call__`` dund
..
code
-
block
::
python
..
code
-
block
::
python
traced_model
(
tokens_tensor
,
segments_tensors
)
traced_model
(
tokens_tensor
,
segments_tensors
)
\ No newline at end of file
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