Skip to content

Commit

Permalink
docs: Fix typo in error message (#2838)
Browse files Browse the repository at this point in the history
Fix error message

Previous: "If `preds` have one dimension more than `target`, the shape of `preds` should  at least 3D when multidim_average is set to `samplewise`"

Now: "If `preds` have one dimension more than `target`, the shape of `preds` should be at least 3D when multidim_average is set to `samplewise`"
  • Loading branch information
ndrwrbgs authored Nov 19, 2024
1 parent 962af66 commit 0d3494f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/torchmetrics/functional/classification/stat_scores.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ def _multiclass_stat_scores_tensor_validation(
)
if multidim_average != "global" and preds.ndim < 3:
raise ValueError(
"If `preds` have one dimension more than `target`, the shape of `preds` should "
"If `preds` have one dimension more than `target`, the shape of `preds` should be"
" at least 3D when multidim_average is set to `samplewise`"
)

Expand All @@ -303,7 +303,7 @@ def _multiclass_stat_scores_tensor_validation(
)
if multidim_average != "global" and preds.ndim < 2:
raise ValueError(
"When `preds` and `target` have the same shape, the shape of `preds` should "
"When `preds` and `target` have the same shape, the shape of `preds` should be"
" at least 2D when multidim_average is set to `samplewise`"
)
else:
Expand Down

0 comments on commit 0d3494f

Please sign in to comment.