Update modeling.py

This commit is contained in:
wlhgtc
2018-12-22 20:26:05 +08:00
committed by GitHub
parent 8da280ebbe
commit e626eecc25

View File

@@ -728,7 +728,7 @@ class BertForMaskedLM(PreTrainedBertModel):
is only computed for the labels set in [0, ..., vocab_size] is only computed for the labels set in [0, ..., vocab_size]
Outputs: Outputs:
if `masked_lm_labels` is `None`: if `masked_lm_labels` is not `None`:
Outputs the masked language modeling loss. Outputs the masked language modeling loss.
if `masked_lm_labels` is `None`: if `masked_lm_labels` is `None`:
Outputs the masked language modeling logits of shape [batch_size, sequence_length, vocab_size]. Outputs the masked language modeling logits of shape [batch_size, sequence_length, vocab_size].