This commit is contained in:
thomwolf
2019-08-20 11:29:26 +02:00
parent 901dde0e45
commit 53c8f700f4
7 changed files with 20 additions and 1 deletions

View File

@@ -599,7 +599,10 @@ BERT_INPUTS_DOCSTRING = r"""
``tokens: [CLS] the dog is hairy . [SEP]``
``token_type_ids: 0 0 0 0 0 0 0``
Bert is a model with absolute position embeddings so it's usually advised to pad the inputs on
the right rather than the left.
Indices can be obtained using :class:`pytorch_transformers.BertTokenizer`.
See :func:`pytorch_transformers.PreTrainedTokenizer.encode` and
:func:`pytorch_transformers.PreTrainedTokenizer.convert_tokens_to_ids` for details.