Skip to content

Commit

Permalink
Fixed wrong parenthesis in PSR definition
Browse files Browse the repository at this point in the history
Co-authored-by: Sarthak Pati <[email protected]>
  • Loading branch information
FelixSteinbauer and sarthakpati authored Jul 31, 2023
1 parent 9472f06 commit 5be2fca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion GANDLF/metrics/synthesis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 5be2fca

Please sign in to comment.