You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The peak_signal_noise_ratio function in the current implementation uses max_val=255.0. However, the images are normalized to the range [0, 1] in the read_image function:
image = tf.cast(image, dtype=tf.float32) / 255.0
Since the pixel values of y_true and y_pred are in the range [0, 1], the max_val parameter in tf.image.psnr should be set to 1.0 instead of 255.0 to correctly compute the PSNR.
The text was updated successfully, but these errors were encountered:
The peak_signal_noise_ratio function in the current implementation uses max_val=255.0. However, the images are normalized to the range [0, 1] in the read_image function:
image = tf.cast(image, dtype=tf.float32) / 255.0
Since the pixel values of y_true and y_pred are in the range [0, 1], the max_val parameter in tf.image.psnr should be set to 1.0 instead of 255.0 to correctly compute the PSNR.
The text was updated successfully, but these errors were encountered: