From f80acfcab65f5efc5a4117cfedf6e0dc2de05727 Mon Sep 17 00:00:00 2001 From: James Betker Date: Thu, 19 Nov 2020 23:47:00 -0700 Subject: [PATCH] Throw if dataset isn't going to work with force_multiple setting --- codes/data/base_unsupervised_image_dataset.py | 1 + 1 file changed, 1 insertion(+) diff --git a/codes/data/base_unsupervised_image_dataset.py b/codes/data/base_unsupervised_image_dataset.py index ec5ee5a6..8391168e 100644 --- a/codes/data/base_unsupervised_image_dataset.py +++ b/codes/data/base_unsupervised_image_dataset.py @@ -17,6 +17,7 @@ class BaseUnsupervisedImageDataset(data.Dataset): self.for_eval = opt['eval'] if 'eval' in opt.keys() else False self.scale = opt['scale'] if not self.for_eval else 1 self.paths = opt['paths'] + assert (self.target_hq_size // self.scale) % self.multiple == 0 # If we dont throw here, we get some really obscure errors. if not isinstance(self.paths, list): self.paths = [self.paths] self.weights = [1]