Skip to content

Commit

Permalink
add missing import
Browse files Browse the repository at this point in the history
  • Loading branch information
SkafteNicki committed Oct 9, 2024
1 parent 6f188a8 commit ebb4f4c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/torchmetrics/utilities/distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
from torch.nn import functional as F # noqa: N812
from typing_extensions import Literal

from torchmetrics.utilities.imports import _TORCH_GREATER_EQUAL_2_1


def reduce(x: Tensor, reduction: Literal["elementwise_mean", "sum", "none", None]) -> Tensor:
"""Reduces a given tensor by a given reduction method.
Expand Down

0 comments on commit ebb4f4c

Please sign in to comment.