From f1ff1ca10258f73d6a85dd1551dbcf90c872baf4 Mon Sep 17 00:00:00 2001 From: LDOUBLEV Date: Thu, 1 Jul 2021 12:12:04 +0800 Subject: [PATCH] fix --- tools/infer/utility.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/infer/utility.py b/tools/infer/utility.py index 3f81e95d..3f720304 100755 --- a/tools/infer/utility.py +++ b/tools/infer/utility.py @@ -141,7 +141,7 @@ def create_predictor(args, mode, logger): max_batch_size=args.max_batch_size) else: config.disable_gpu() - cpu_threads = args.cpu_threads if hasattr(args, cpu_threads) else 10 + cpu_threads = args.cpu_threads if hasattr(args, "cpu_threads") else 10 config.set_cpu_math_library_num_threads(cpu_threads) if args.enable_mkldnn: # cache 10 different shapes for mkldnn to avoid memory leak