From f498a63f1080e323d729decd8a6a957f51cd10b8 Mon Sep 17 00:00:00 2001 From: tink2123 Date: Wed, 5 Aug 2020 16:42:21 +0800 Subject: [PATCH] update error message --- ppocr/data/rec/dataset_traversal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ppocr/data/rec/dataset_traversal.py b/ppocr/data/rec/dataset_traversal.py index bb63afe1..ec3e9d86 100755 --- a/ppocr/data/rec/dataset_traversal.py +++ b/ppocr/data/rec/dataset_traversal.py @@ -248,7 +248,7 @@ class SimpleReader(object): "num_workers will be 1.") self.num_workers = 1 if self.batch_size * get_device_num() > img_num: - logger.error( + raise Exception( "The number of the whole data ({}) is smaller than the batch_size * devices_num ({})". format(img_num, self.batch_size * get_device_num())) for img_id in range(process_id, img_num, self.num_workers): -- GitLab