From 2098d343cc4b4b9d2aea84b3cf1eb5a1e610deff Mon Sep 17 00:00:00 2001 From: Anirudh Haritas Murali <49116134+anihm136@users.noreply.github.com> Date: Fri, 24 Nov 2023 17:11:16 +0530 Subject: [PATCH] Fix semantic error in evaluation section (#27675) Change "convert predictions to logits" to "convert logits to predictions" to fix semantic error in the evaluation section. Logits need to be converted to predictions to evaluate the accuracy, not the other way round --- docs/source/en/training.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/en/training.md b/docs/source/en/training.md index 1744a44153..8e81048bf5 100644 --- a/docs/source/en/training.md +++ b/docs/source/en/training.md @@ -119,7 +119,7 @@ Specify where to save the checkpoints from your training: >>> metric = evaluate.load("accuracy") ``` -Call [`~evaluate.compute`] on `metric` to calculate the accuracy of your predictions. Before passing your predictions to `compute`, you need to convert the predictions to logits (remember all 🤗 Transformers models return logits): +Call [`~evaluate.compute`] on `metric` to calculate the accuracy of your predictions. Before passing your predictions to `compute`, you need to convert the logits to predictions (remember all 🤗 Transformers models return logits): ```py >>> def compute_metrics(eval_pred):