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
e1e2ab34
Unverified
Commit
e1e2ab34
authored
Jul 25, 2019
by
Sukuya
Committed by
GitHub
Jul 25, 2019
Browse files
Merge pull request #1 from sukuya/sukuya-patch-1
Update torchscript.rst
parents
067923d3
35c52f2f
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 @
e1e2ab34
...
@@ -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