Fix the masked LM model

This commit is contained in:
LysandreJik
2020-12-10 15:25:33 -05:00
parent a1ec0a6a07
commit f872d4c5ed
@@ -925,6 +925,9 @@ class TapasForMaskedLM(TapasPreTrainedModel):
def get_output_embeddings(self):
return self.lm_head
def set_output_embeddings(self, word_embeddings):
self.lm_head = word_embeddings
@add_start_docstrings_to_model_forward(TAPAS_INPUTS_DOCSTRING.format("batch_size, sequence_length"))
@replace_return_docstrings(output_type=MaskedLMOutput, config_class=_CONFIG_FOR_DOC)
def forward(