From 0a5a12946ae84d3c97b6b61abe144a19083b3eb8 Mon Sep 17 00:00:00 2001 From: LDOUBLEV Date: Tue, 4 Jan 2022 20:31:32 +0800 Subject: [PATCH 1/2] fix --- ...inux_gpu_normal_normal_infer_python_linux_gpu_cpu.txt | 2 +- test_tipc/test_train_inference_python.sh | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/test_tipc/configs/ch_PP-OCRv2_det_KL/model_linux_gpu_normal_normal_infer_python_linux_gpu_cpu.txt b/test_tipc/configs/ch_PP-OCRv2_det_KL/model_linux_gpu_normal_normal_infer_python_linux_gpu_cpu.txt index 1aad65b687..3aa1e71306 100644 --- a/test_tipc/configs/ch_PP-OCRv2_det_KL/model_linux_gpu_normal_normal_infer_python_linux_gpu_cpu.txt +++ b/test_tipc/configs/ch_PP-OCRv2_det_KL/model_linux_gpu_normal_normal_infer_python_linux_gpu_cpu.txt @@ -3,7 +3,7 @@ model_name:PPOCRv2_ocr_det_kl python:python3.7 Global.pretrained_model:null Global.save_inference_dir:null -infer_model:./inference/ch_PP-OCRv2_det_infer/ +infer_model:./inference/ch_PP-OCRv2_det_infer infer_export:deploy/slim/quantization/quant_kl.py -c configs/det/ch_PP-OCRv2/ch_PP-OCRv2_det_cml.yml -o infer_quant:True inference:tools/infer/predict_det.py diff --git a/test_tipc/test_train_inference_python.sh b/test_tipc/test_train_inference_python.sh index b9bf9edf30..9bde89d78e 100644 --- a/test_tipc/test_train_inference_python.sh +++ b/test_tipc/test_train_inference_python.sh @@ -183,7 +183,7 @@ function func_inference(){ if [[ ${precision} =~ "fp16" || ${precision} =~ "int8" ]] && [ ${use_trt} = "False" ]; then continue fi - if [[ ${use_trt} = "False" || ${precision} =~ "int8" ]] && [ ${_flag_quant} = "True" ]; then + if [[ ${use_trt} = "False" && ${precision} =~ "int8" ]] && [ ${_flag_quant} = "True" ]; then continue fi for batch_size in ${batch_size_list[*]}; do @@ -227,7 +227,12 @@ if [ ${MODE} = "whole_infer" ] || [ ${MODE} = "klquant_whole_infer" ]; then for infer_model in ${infer_model_dir_list[*]}; do # run export if [ ${infer_run_exports[Count]} != "null" ];then - save_infer_dir=$(dirname $infer_model) + if [ ${MODE} = "klquant_whole_infer" ]; then + save_infer_dir="${infer_model}_klquant" + fi + if [ ${MODE} = "whole_infer" ]; then + save_infer_dir="${infer_model}" + fi set_export_weight=$(func_set_params "${export_weight}" "${infer_model}") set_save_infer_key=$(func_set_params "${save_infer_key}" "${save_infer_dir}") export_cmd="${python} ${infer_run_exports[Count]} ${set_export_weight} ${set_save_infer_key}" From 10b38eba95c4ea38e80b7dfb561da800d829e641 Mon Sep 17 00:00:00 2001 From: LDOUBLEV Date: Wed, 5 Jan 2022 15:07:24 +0800 Subject: [PATCH 2/2] fix download failed --- test_tipc/prepare.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test_tipc/prepare.sh b/test_tipc/prepare.sh index 5c67642ef5..4f703832aa 100644 --- a/test_tipc/prepare.sh +++ b/test_tipc/prepare.sh @@ -239,8 +239,7 @@ fi if [ ${MODE} = "klquant_whole_infer" ]; then wget -nc -P ./train_data/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/icdar2015_lite.tar --no-check-certificate - cd ./train_data/ && tar xf icdar2015_lite.tar - ln -s ./icdar2015_lite ./icdar2015 && cd ../ + cd ./train_data/ && tar xf icdar2015_lite.tar && rm -rf ./icdar2015 && ln -s ./icdar2015_lite ./icdar2015 && cd ../ if [ ${model_name} = "ch_ppocr_mobile_v2.0_det_KL" ]; then wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_det_infer.tar --no-check-certificate wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/ch_det_data_50.tar --no-check-certificate