Add coref + bert training config
@@ -14,6 +14,21 @@ class CorefTest(ModelTestCase):
def test_coref_model_can_train_save_and_load(self):
self.ensure_model_can_train_save_and_load(self.param_file)
+ def test_coref_bert_model_can_train_save_and_load(self):
+ self.set_up_model(
+ self.FIXTURES_ROOT / "coref" / "coref_bert_lstm_small.jsonnet",
+ self.FIXTURES_ROOT / "coref" / "coref.gold_conll",
+ )
+ self.ensure_model_can_train_save_and_load(
+ self.param_file,
+ gradients_to_ignore={
+ "_text_field_embedder.token_embedder_tokens._matched_embedder"
+ ".transformer_model.pooler.weight",
+ "_text_field_embedder.token_embedder_tokens._matched_embedder"
+ ".transformer_model.pooler.bias",
+ },
+ )
+
def test_decode(self):
spans = torch.LongTensor([[1, 2], [3, 4], [3, 7], [5, 6], [14, 56], [17, 80]])
