diff --git a/ppocr/data/rec/dataset_traversal.py b/ppocr/data/rec/dataset_traversal.py index bb63afe1732e228600f9bf4610ea1c345201b52e..ec3e9d867ce659b729c021c3a02acead73cacf52 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):