From e626eecc25b92398b7cf1e06d4fad5ca1df72c18 Mon Sep 17 00:00:00 2001 From: wlhgtc Date: Sat, 22 Dec 2018 20:26:05 +0800 Subject: [PATCH] Update modeling.py --- pytorch_pretrained_bert/modeling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytorch_pretrained_bert/modeling.py b/pytorch_pretrained_bert/modeling.py index acdc741f6d..ad423e79dd 100644 --- a/pytorch_pretrained_bert/modeling.py +++ b/pytorch_pretrained_bert/modeling.py @@ -728,7 +728,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].