Commit c4336ecb authored by VictorSanh's avatar VictorSanh Committed by Lysandre Debut
Browse files

xnli - output_mode consistency

parent d52e98ff
......@@ -247,8 +247,8 @@ def evaluate(args, model, tokenizer, prefix=""):
eval_loss = eval_loss / nb_eval_steps
if args.output_mode == "classification":
preds = np.argmax(preds, axis=1)
elif args.output_mode == "regression":
preds = np.squeeze(preds)
else:
raise ValueError(f'No other `output_mode` for XNLI.')
result = compute_metrics(eval_task, preds, out_label_ids)
results.update(result)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment