From 52ced2e75777d1e0966af1c4c0a0909823a3aa19 Mon Sep 17 00:00:00 2001 From: qslia Date: Sun, 10 Apr 2022 07:54:48 +0800 Subject: [PATCH] print assert error correctly Former-commit-id: 8c7feff7cf740e788228839883a592c87097add2 --- 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..e4625ac 100644 --- a/utils/data_loading.py +++ b/utils/data_loading.py @@ -64,7 +64,7 @@ class BasicDataset(Dataset): img = self.load(img_file[0]) assert img.size == mask.size, \ - 'Image and mask {name} should be the same size, but are {img.size} and {mask.size}' + f'Image and mask {name} should be the same size, but are {img.size} and {mask.size}' img = self.preprocess(img, self.scale, is_mask=False) mask = self.preprocess(mask, self.scale, is_mask=True)