added test set (using training data for now)

This commit is contained in:
Ethan Weber committed 2022-04-22 03:45:06 +00:00
1 parent 7e5a5bf524
commit cf7034f0d1
10 files changed
+112 -57

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
"""
Collection of metrics.
"""
import torch
def get_psnr(image_gt, image_pred):
"""
Returns the psnr for an image. TODO: add masking
"""
mean = torch.mean((image_gt - image_pred) ** 2)
return -10 * torch.log10(mean)