From 5be2fcaebbe37febbf55b750efb4f5a928f8cd37 Mon Sep 17 00:00:00 2001 From: FelixSteinbauer <43598998+FelixSteinbauer@users.noreply.github.com> Date: Mon, 31 Jul 2023 17:09:31 +0200 Subject: [PATCH] Fixed wrong parenthesis in PSR definition Co-authored-by: Sarthak Pati --- GANDLF/metrics/synthesis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GANDLF/metrics/synthesis.py b/GANDLF/metrics/synthesis.py index 4d70e284b..a10ba7d96 100644 --- a/GANDLF/metrics/synthesis.py +++ b/GANDLF/metrics/synthesis.py @@ -69,7 +69,7 @@ def peak_signal_noise_ratio(target, prediction, data_range=None, epsilon=None) - min_v = 0 if torch.min(target) > 0 else torch.min(target) #look at this line max_v = torch.max(target) data_range = max_v - min_v - return 10.0 * (( torch.log10(data_range) ** 2) / (mse + epsilon) ) + return 10.0 * torch.log10((data_range ** 2) / (mse + epsilon)) def mean_squared_log_error(target, prediction) -> torch.Tensor: