From d4da0457be0e33b19827f233216634093aa3b9fd Mon Sep 17 00:00:00 2001 From: wuzewu Date: Thu, 5 Sep 2019 15:51:37 +0800 Subject: [PATCH] Update config check --- pdseg/utils/collect.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pdseg/utils/collect.py b/pdseg/utils/collect.py index 0be64222..010a5c4b 100644 --- a/pdseg/utils/collect.py +++ b/pdseg/utils/collect.py @@ -98,6 +98,16 @@ class SegConfig(dict): 'DATASET.IMAGE_TYPE config error, only support `rgb`, `gray` and `rgba`' ) + if not self.TRAIN_CROP_SIZE: + raise ValueError( + 'TRAIN_CROP_SIZE is empty! Please set a pair of values in format (width, height)' + ) + + if not self.EVAL_CROP_SIZE: + raise ValueError( + 'EVAL_CROP_SIZE is empty! Please set a pair of values in format (width, height)' + ) + if reset_dataset: # Ensure file list is use UTF-8 encoding train_sets = codecs.open(self.DATASET.TRAIN_FILE_LIST, 'r', -- GitLab