Skip to content

Commit

Permalink
fix minmax (#2512)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexriedel1 authored Jan 17, 2025
1 parent 8d14ae1 commit e1523c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/anomalib/metrics/min_max.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def update(self, predictions: torch.Tensor, *args, **kwargs) -> None:
del args, kwargs # These variables are not used.

self.min = torch.min(self.min, torch.min(predictions))
self.max = torch.max(self.min, torch.max(predictions))
self.max = torch.max(self.max, torch.max(predictions))

def compute(self) -> tuple[torch.Tensor, torch.Tensor]:
"""Compute final minimum and maximum values.
Expand Down

0 comments on commit e1523c8

Please sign in to comment.