diff --git a/pytorch_pretrained_bert/modeling.py b/pytorch_pretrained_bert/modeling.py index 8eb856e6..3cb0bf16 100644 --- a/pytorch_pretrained_bert/modeling.py +++ b/pytorch_pretrained_bert/modeling.py @@ -730,7 +730,7 @@ class BertForMaskedLM(PreTrainedBertModel): is only computed for the labels set in [0, ..., vocab_size] Outputs: - if `masked_lm_labels` is `None`: + if `masked_lm_labels` is not `None`: Outputs the masked language modeling loss. if `masked_lm_labels` is `None`: Outputs the masked language modeling logits of shape [batch_size, sequence_length, vocab_size].