Merge pull request #888 from rococode/patch-1

Update docs for parameter rename
This commit is contained in:
Thomas Wolf 2019-07-25 15:01:22 +02:00 committed by GitHub
commit 6219ad7216
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -538,7 +538,7 @@ class OpenAIGPTLMHeadModel(OpenAIGPTPreTrainedModel):
r"""
**labels**: (`optional`) ``torch.LongTensor`` of shape ``(batch_size, sequence_length)``:
Labels for language modeling.
Note that the labels **are shifted** inside the model, i.e. you can set ``lm_labels = input_ids``
Note that the labels **are shifted** inside the model, i.e. you can set ``labels = input_ids``
Indices are selected in ``[-1, 0, ..., config.vocab_size]``
All labels set to ``-1`` are ignored (masked), the loss is only
computed for labels in ``[0, ..., config.vocab_size]``