Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Apr 12, 2024
1 parent 45fd002 commit 179f6d9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/torchmetrics/functional/segmentation/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 179f6d9

Please sign in to comment.