From b2e1a8498187e6ccb86e33d19104621c1ccf67be Mon Sep 17 00:00:00 2001 From: Neo Date: Tue, 18 Aug 2020 15:07:25 +0800 Subject: [PATCH] Update dataset_traversal.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CUDA_VISIBLE_DEVICES 默认值必须为str, 否则split会报错 --- 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 5efba512..ebee624a 100755 --- a/ppocr/data/rec/dataset_traversal.py +++ b/ppocr/data/rec/dataset_traversal.py @@ -237,7 +237,7 @@ class SimpleReader(object): def get_device_num(): if self.use_gpu: - gpus = os.environ.get("CUDA_VISIBLE_DEVICES", 1) + gpus = os.environ.get("CUDA_VISIBLE_DEVICES", '1') gpu_num = len(gpus.split(',')) return gpu_num else: -- GitLab