diff --git a/src/anomalib/metrics/min_max.py b/src/anomalib/metrics/min_max.py index ce04484603..bdeea8968d 100644 --- a/src/anomalib/metrics/min_max.py +++ b/src/anomalib/metrics/min_max.py @@ -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.