Fixing tests for perceiver (texts) (#14719)

* Fixing tests for perceiver (texts)

* For MaskedLM
This commit is contained in:
Nicolas Patry
2021-12-11 01:38:59 +01:00
committed by GitHub
parent 39fbb068be
commit 7cb1fdd4d1
2 changed files with 23 additions and 0 deletions

View File

@@ -196,6 +196,13 @@ class PerceiverModelTester:
num_labels=self.num_labels,
)
def get_pipeline_config(self):
config = self.get_config()
# Byte level vocab
config.vocab_size = 261
config.max_position_embeddings = 40
return config
def create_and_check_for_masked_lm(self, config, inputs, input_mask, sequence_labels, token_labels):
model = PerceiverForMaskedLM(config=config)
model.to(torch_device)