fix #971
This commit is contained in:
@@ -603,7 +603,7 @@ BERT_INPUTS_DOCSTRING = r"""
|
|||||||
:func:`pytorch_transformers.PreTrainedTokenizer.convert_tokens_to_ids` for details.
|
:func:`pytorch_transformers.PreTrainedTokenizer.convert_tokens_to_ids` for details.
|
||||||
**position_ids**: (`optional`) ``torch.LongTensor`` of shape ``(batch_size, sequence_length)``:
|
**position_ids**: (`optional`) ``torch.LongTensor`` of shape ``(batch_size, sequence_length)``:
|
||||||
Indices of positions of each input sequence tokens in the position embeddings.
|
Indices of positions of each input sequence tokens in the position embeddings.
|
||||||
Selected in the range ``[0, config.max_position_embeddings - 1[``.
|
Selected in the range ``[0, config.max_position_embeddings - 1]``.
|
||||||
**token_type_ids**: (`optional`) ``torch.LongTensor`` of shape ``(batch_size, sequence_length)``:
|
**token_type_ids**: (`optional`) ``torch.LongTensor`` of shape ``(batch_size, sequence_length)``:
|
||||||
Segment token indices to indicate first and second portions of the inputs.
|
Segment token indices to indicate first and second portions of the inputs.
|
||||||
Indices are selected in ``[0, 1]``: ``0`` corresponds to a `sentence A` token, ``1``
|
Indices are selected in ``[0, 1]``: ``0`` corresponds to a `sentence A` token, ``1``
|
||||||
|
|||||||
@@ -393,7 +393,7 @@ GPT2_INPUTS_DOCSTRING = r""" Inputs:
|
|||||||
:func:`pytorch_transformers.PreTrainedTokenizer.convert_tokens_to_ids` for details.
|
:func:`pytorch_transformers.PreTrainedTokenizer.convert_tokens_to_ids` for details.
|
||||||
**position_ids**: (`optional`) ``torch.LongTensor`` of shape ``(batch_size, sequence_length)``:
|
**position_ids**: (`optional`) ``torch.LongTensor`` of shape ``(batch_size, sequence_length)``:
|
||||||
Indices of positions of each input sequence tokens in the position embeddings.
|
Indices of positions of each input sequence tokens in the position embeddings.
|
||||||
Selected in the range ``[0, config.max_position_embeddings - 1[``.
|
Selected in the range ``[0, config.max_position_embeddings - 1]``.
|
||||||
**token_type_ids**: (`optional`) ``torch.LongTensor`` of shape ``(batch_size, sequence_length)``:
|
**token_type_ids**: (`optional`) ``torch.LongTensor`` of shape ``(batch_size, sequence_length)``:
|
||||||
A parallel sequence of tokens (can be used to indicate various portions of the inputs).
|
A parallel sequence of tokens (can be used to indicate various portions of the inputs).
|
||||||
The embeddings from these tokens will be summed with the respective token embeddings.
|
The embeddings from these tokens will be summed with the respective token embeddings.
|
||||||
@@ -627,7 +627,7 @@ class GPT2DoubleHeadsModel(GPT2PreTrainedModel):
|
|||||||
Selected in the range ``[0, input_ids.size(-1) - 1[``.
|
Selected in the range ``[0, input_ids.size(-1) - 1[``.
|
||||||
**position_ids**: (`optional`) ``torch.LongTensor`` of shape ``(batch_size, num_choices, sequence_length)``:
|
**position_ids**: (`optional`) ``torch.LongTensor`` of shape ``(batch_size, num_choices, sequence_length)``:
|
||||||
Indices of positions of each input sequence tokens in the position embeddings.
|
Indices of positions of each input sequence tokens in the position embeddings.
|
||||||
Selected in the range ``[0, config.max_position_embeddings - 1[``.
|
Selected in the range ``[0, config.max_position_embeddings - 1]``.
|
||||||
**token_type_ids**: (`optional`) ``torch.LongTensor`` of shape ``(batch_size, num_choices, sequence_length)``:
|
**token_type_ids**: (`optional`) ``torch.LongTensor`` of shape ``(batch_size, num_choices, sequence_length)``:
|
||||||
A parallel sequence of tokens (can be used to indicate various portions of the inputs).
|
A parallel sequence of tokens (can be used to indicate various portions of the inputs).
|
||||||
The embeddings from these tokens will be summed with the respective token embeddings.
|
The embeddings from these tokens will be summed with the respective token embeddings.
|
||||||
|
|||||||
@@ -407,7 +407,7 @@ OPENAI_GPT_INPUTS_DOCSTRING = r""" Inputs:
|
|||||||
:func:`pytorch_transformers.PreTrainedTokenizer.convert_tokens_to_ids` for details.
|
:func:`pytorch_transformers.PreTrainedTokenizer.convert_tokens_to_ids` for details.
|
||||||
**position_ids**: (`optional`) ``torch.LongTensor`` of shape ``(batch_size, sequence_length)``:
|
**position_ids**: (`optional`) ``torch.LongTensor`` of shape ``(batch_size, sequence_length)``:
|
||||||
Indices of positions of each input sequence tokens in the position embeddings.
|
Indices of positions of each input sequence tokens in the position embeddings.
|
||||||
Selected in the range ``[0, config.max_position_embeddings - 1[``.
|
Selected in the range ``[0, config.max_position_embeddings - 1]``.
|
||||||
**token_type_ids**: (`optional`) ``torch.LongTensor`` of shape ``(batch_size, sequence_length)``:
|
**token_type_ids**: (`optional`) ``torch.LongTensor`` of shape ``(batch_size, sequence_length)``:
|
||||||
A parallel sequence of tokens (can be used to indicate various portions of the inputs).
|
A parallel sequence of tokens (can be used to indicate various portions of the inputs).
|
||||||
The embeddings from these tokens will be summed with the respective token embeddings.
|
The embeddings from these tokens will be summed with the respective token embeddings.
|
||||||
@@ -617,7 +617,7 @@ class OpenAIGPTDoubleHeadsModel(OpenAIGPTPreTrainedModel):
|
|||||||
Selected in the range ``[0, input_ids.size(-1) - 1[``.
|
Selected in the range ``[0, input_ids.size(-1) - 1[``.
|
||||||
**position_ids**: (`optional`) ``torch.LongTensor`` of shape ``(batch_size, num_choices, sequence_length)``:
|
**position_ids**: (`optional`) ``torch.LongTensor`` of shape ``(batch_size, num_choices, sequence_length)``:
|
||||||
Indices of positions of each input sequence tokens in the position embeddings.
|
Indices of positions of each input sequence tokens in the position embeddings.
|
||||||
Selected in the range ``[0, config.max_position_embeddings - 1[``.
|
Selected in the range ``[0, config.max_position_embeddings - 1]``.
|
||||||
**token_type_ids**: (`optional`) ``torch.LongTensor`` of shape ``(batch_size, num_choices, sequence_length)``:
|
**token_type_ids**: (`optional`) ``torch.LongTensor`` of shape ``(batch_size, num_choices, sequence_length)``:
|
||||||
A parallel sequence of tokens (can be used to indicate various portions of the inputs).
|
A parallel sequence of tokens (can be used to indicate various portions of the inputs).
|
||||||
The embeddings from these tokens will be summed with the respective token embeddings.
|
The embeddings from these tokens will be summed with the respective token embeddings.
|
||||||
|
|||||||
@@ -427,7 +427,7 @@ XLM_INPUTS_DOCSTRING = r"""
|
|||||||
:func:`pytorch_transformers.PreTrainedTokenizer.convert_tokens_to_ids` for details.
|
:func:`pytorch_transformers.PreTrainedTokenizer.convert_tokens_to_ids` for details.
|
||||||
**position_ids**: (`optional`) ``torch.LongTensor`` of shape ``(batch_size, sequence_length)``:
|
**position_ids**: (`optional`) ``torch.LongTensor`` of shape ``(batch_size, sequence_length)``:
|
||||||
Indices of positions of each input sequence tokens in the position embeddings.
|
Indices of positions of each input sequence tokens in the position embeddings.
|
||||||
Selected in the range ``[0, config.max_position_embeddings - 1[``.
|
Selected in the range ``[0, config.max_position_embeddings - 1]``.
|
||||||
**token_type_ids**: (`optional`) ``torch.LongTensor`` of shape ``(batch_size, sequence_length)``:
|
**token_type_ids**: (`optional`) ``torch.LongTensor`` of shape ``(batch_size, sequence_length)``:
|
||||||
A parallel sequence of tokens (can be used to indicate various portions of the inputs).
|
A parallel sequence of tokens (can be used to indicate various portions of the inputs).
|
||||||
The embeddings from these tokens will be summed with the respective token embeddings.
|
The embeddings from these tokens will be summed with the respective token embeddings.
|
||||||
|
|||||||
Reference in New Issue
Block a user