From 111450f4e722ef7d6d3690562b5759fc13b47db8 Mon Sep 17 00:00:00 2001 From: James Betker Date: Mon, 19 Oct 2020 15:30:25 -0600 Subject: [PATCH] Use areal interpolate for multiscale_dataset --- codes/data/multiscale_dataset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codes/data/multiscale_dataset.py b/codes/data/multiscale_dataset.py index 0a96eb20..cc5aa78a 100644 --- a/codes/data/multiscale_dataset.py +++ b/codes/data/multiscale_dataset.py @@ -78,7 +78,7 @@ class MultiScaleDataset(data.Dataset): patches_hq = [torch.from_numpy(np.ascontiguousarray(np.transpose(p, (2, 0, 1)))).float() for p in patches_hq] patches_hq = torch.stack(patches_hq, dim=0) patches_hq_corrupted = [torch.from_numpy(np.ascontiguousarray(np.transpose(p, (2, 0, 1)))).float() for p in patches_hq_corrupted] - patches_lq = [torch.nn.functional.interpolate(p.unsqueeze(0), scale_factor=1/self.scale, mode='bilinear').squeeze() for p in patches_hq_corrupted] + patches_lq = [torch.nn.functional.interpolate(p.unsqueeze(0), scale_factor=1/self.scale, mode='area').squeeze() for p in patches_hq_corrupted] patches_lq = torch.stack(patches_lq, dim=0) d = {'LQ': patches_lq, 'GT': patches_hq, 'GT_path': full_path}