Update docs for parameter rename

OpenAIGPTLMHeadModel now accepts `labels` instead of `lm_labels`
This commit is contained in:
rococo // Ron
2019-07-24 11:27:08 -07:00
committed by GitHub
parent 067923d326
commit 66b15f73f0

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]``