From 179f6d99bd7cc07f62902dcfcaa94aa47e3772d3 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 12 Apr 2024 14:25:08 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/torchmetrics/functional/segmentation/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/torchmetrics/functional/segmentation/utils.py b/src/torchmetrics/functional/segmentation/utils.py index 34be884b282..e8427a69326 100644 --- a/src/torchmetrics/functional/segmentation/utils.py +++ b/src/torchmetrics/functional/segmentation/utils.py @@ -23,6 +23,7 @@ from torchmetrics.utilities.checks import _check_same_shape from torchmetrics.utilities.imports import _SCIPY_AVAILABLE + def _ignore_background(preds: Tensor, target: Tensor) -> Tuple[Tensor, Tensor]: """Ignore the background class in the computation.""" preds = preds[:, 1:] if preds.shape[1] > 1 else preds