(self, config)
| 956 | ``` |
| 957 | """ |
| 958 | def __init__(self, config): |
| 959 | super(BertForMaskedLM, self).__init__(config) |
| 960 | self.bert = BertModel(config) |
| 961 | self.cls = BertOnlyMLMHead(config, self.bert.embeddings.word_embeddings.weight) |
| 962 | self.apply(self.init_bert_weights) |
| 963 | |
| 964 | def forward(self, input_ids, token_type_ids=None, attention_mask=None, masked_lm_labels=None, checkpoint_activations=False): |
| 965 | sequence_output, _ = self.bert(input_ids, token_type_ids, attention_mask, |
nothing calls this directly
no test coverage detected