From 99e36df431f515bc93e5e2a2eb278475bfc6a9e0 Mon Sep 17 00:00:00 2001 From: Gouvernathor Date: Wed, 6 Apr 2022 13:45:19 +0200 Subject: [PATCH] change the order of asserts Former-commit-id: 6cd4b68c997542cf0a9ca205120fd4f275e3cb24 --- utils/data_loading.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/data_loading.py b/utils/data_loading.py index 63c4313..d594c57 100644 --- a/utils/data_loading.py +++ b/utils/data_loading.py @@ -58,8 +58,8 @@ class BasicDataset(Dataset): mask_file = list(self.masks_dir.glob(name + self.mask_suffix + '.*')) img_file = list(self.images_dir.glob(name + '.*')) - assert len(mask_file) == 1, f'Either no mask or multiple masks found for the ID {name}: {mask_file}' assert len(img_file) == 1, f'Either no image or multiple images found for the ID {name}: {img_file}' + assert len(mask_file) == 1, f'Either no mask or multiple masks found for the ID {name}: {mask_file}' mask = self.load(mask_file[0]) img = self.load(img_file[0])