From 1b027c11bf6ac1003be7f16896fd823009a7a8ab Mon Sep 17 00:00:00 2001 From: baihuawei Date: Wed, 14 Apr 2021 15:36:06 +0800 Subject: [PATCH] fix lenet performance on cpu --- model_zoo/official/cv/lenet/scripts/run_standalone_eval_cpu.sh | 1 + model_zoo/official/cv/lenet/scripts/run_standalone_train_cpu.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/model_zoo/official/cv/lenet/scripts/run_standalone_eval_cpu.sh b/model_zoo/official/cv/lenet/scripts/run_standalone_eval_cpu.sh index e05dbc9965..10b9f0d836 100755 --- a/model_zoo/official/cv/lenet/scripts/run_standalone_eval_cpu.sh +++ b/model_zoo/official/cv/lenet/scripts/run_standalone_eval_cpu.sh @@ -19,4 +19,5 @@ script_self=$(readlink -f "$0") self_path=$(dirname "${script_self}") DATA_PATH=$1 CKPT_PATH=$2 +export OMP_NUM_THREADS=1 python -s ${self_path}/../eval.py --data_path=$DATA_PATH --device_target="CPU" --ckpt_path=$CKPT_PATH > log.txt 2>&1 & diff --git a/model_zoo/official/cv/lenet/scripts/run_standalone_train_cpu.sh b/model_zoo/official/cv/lenet/scripts/run_standalone_train_cpu.sh index f494467a7c..ced49d77ec 100755 --- a/model_zoo/official/cv/lenet/scripts/run_standalone_train_cpu.sh +++ b/model_zoo/official/cv/lenet/scripts/run_standalone_train_cpu.sh @@ -19,4 +19,5 @@ script_self=$(readlink -f "$0") self_path=$(dirname "${script_self}") DATA_PATH=$1 CKPT_PATH=$2 +export OMP_NUM_THREADS=1 python -s ${self_path}/../train.py --data_path=$DATA_PATH --device_target="CPU" --ckpt_path=$CKPT_PATH > log.txt 2>&1 &