Merge pull request #899 from sukuya/master

Fixed import to use torchscript flag.
This commit is contained in:
Thomas Wolf 2019-07-25 15:03:21 +02:00 committed by GitHub
commit 46cc9dd2b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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_bert import BertModel, BertTokenizer, BertConfig from pytorch_transformers 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
.. code-block:: python .. code-block:: python
traced_model(tokens_tensor, segments_tensors) traced_model(tokens_tensor, segments_tensors)