run_tf_glue MRPC evaluation only for MRPC

This commit is contained in:
Lysandre
2019-10-31 18:00:51 -04:00
parent be36cf92fb
commit 1a2b40cb53

View File

@@ -71,6 +71,7 @@ history = model.fit(train_dataset, epochs=EPOCHS, steps_per_epoch=train_steps,
os.makedirs('./save/', exist_ok=True)
model.save_pretrained('./save/')
if TASK == "mrpc":
# Load the TensorFlow model in PyTorch for inspection
pytorch_model = BertForSequenceClassification.from_pretrained('./save/', from_tf=True)