"git@developer.sourcefind.cn:gaoqiong/composable_kernel.git" did not exist on "e9707881e3962b45fbe771bca1def0ebbce15353"
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=""): ...@@ -247,8 +247,8 @@ def evaluate(args, model, tokenizer, prefix=""):
eval_loss = eval_loss / nb_eval_steps eval_loss = eval_loss / nb_eval_steps
if args.output_mode == "classification": if args.output_mode == "classification":
preds = np.argmax(preds, axis=1) preds = np.argmax(preds, axis=1)
elif args.output_mode == "regression": else:
preds = np.squeeze(preds) raise ValueError(f'No other `output_mode` for XNLI.')
result = compute_metrics(eval_task, preds, out_label_ids) result = compute_metrics(eval_task, preds, out_label_ids)
results.update(result) 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