提交 eee786e5 编写于 作者: A andyjpaddle

add KL PACT

上级 3c9a7593
...@@ -57,10 +57,11 @@ function status_check(){ ...@@ -57,10 +57,11 @@ function status_check(){
last_status=$1 # the exit code last_status=$1 # the exit code
run_command=$2 run_command=$2
run_log=$3 run_log=$3
model_name=$4
if [ $last_status -eq 0 ]; then if [ $last_status -eq 0 ]; then
echo -e "\033[33m Run successfully with command - ${run_command}! \033[0m" | tee -a ${run_log} echo -e "\033[33m Run successfully with command - ${model_name} - ${run_command}! \033[0m" | tee -a ${run_log}
else else
echo -e "\033[33m Run failed with command - ${run_command}! \033[0m" | tee -a ${run_log} echo -e "\033[33m Run failed with command - ${model_name} - ${run_command}! \033[0m" | tee -a ${run_log}
fi fi
} }
===========================kl_quant_params=========================== ===========================kl_quant_params===========================
model_name:PPOCRv2_ocr_det_kl model_name:ch_PP-OCRv2_det_KL
python:python3.7 python:python3.7
Global.pretrained_model:null Global.pretrained_model:null
Global.save_inference_dir:null Global.save_inference_dir:null
...@@ -8,10 +8,10 @@ infer_export:deploy/slim/quantization/quant_kl.py -c configs/det/ch_PP-OCRv2/ch_ ...@@ -8,10 +8,10 @@ infer_export:deploy/slim/quantization/quant_kl.py -c configs/det/ch_PP-OCRv2/ch_
infer_quant:True infer_quant:True
inference:tools/infer/predict_det.py inference:tools/infer/predict_det.py
--use_gpu:False|True --use_gpu:False|True
--enable_mkldnn:True --enable_mkldnn:False
--cpu_threads:1|6 --cpu_threads:6
--rec_batch_num:1 --rec_batch_num:1
--use_tensorrt:False|True --use_tensorrt:False
--precision:int8 --precision:int8
--det_model_dir: --det_model_dir:
--image_dir:./inference/ch_det_data_50/all-sum-510/ --image_dir:./inference/ch_det_data_50/all-sum-510/
......
===========================kl_quant_params=========================== ===========================kl_quant_params===========================
model_name:PPOCRv2_ocr_rec_kl model_name:ch_PP-OCRv2_rec_KL
python:python3.7 python:python3.7
Global.pretrained_model:null Global.pretrained_model:null
Global.save_inference_dir:null Global.save_inference_dir:null
infer_model:./inference/ch_PP-OCRv2_rec_infer/ infer_model:./inference/ch_PP-OCRv2_rec_infer/
infer_export:deploy/slim/quantization/quant_kl.py -c test_tipc/configs/ch_PP-OCRv2_rec/ch_PP-OCRv2_rec_distillation.yml -o infer_export:deploy/slim/quantization/quant_kl.py -c test_tipc/configs/ch_PP-OCRv2_rec/ch_PP-OCRv2_rec_distillation.yml -o
infer_quant:True infer_quant:True
inference:tools/infer/predict_rec.py inference:tools/infer/predict_rec.py --rec_image_shape="3,32,320"
--use_gpu:False|True --use_gpu:False|True
--enable_mkldnn:False|True --enable_mkldnn:False
--cpu_threads:1|6 --cpu_threads:6
--rec_batch_num:1|6 --rec_batch_num:1|6
--use_tensorrt:True --use_tensorrt:False
--precision:int8 --precision:int8
--rec_model_dir: --rec_model_dir:
--image_dir:./inference/rec_inference --image_dir:./inference/rec_inference
......
...@@ -4,7 +4,7 @@ python:python3.7 ...@@ -4,7 +4,7 @@ python:python3.7
gpu_list:0|0,1 gpu_list:0|0,1
Global.use_gpu:True|True Global.use_gpu:True|True
Global.auto_cast:fp32 Global.auto_cast:fp32
Global.epoch_num:lite_train_lite_infer=6|whole_train_whole_infer=50 Global.epoch_num:lite_train_lite_infer=1|whole_train_whole_infer=50
Global.save_model_dir:./output/ Global.save_model_dir:./output/
Train.loader.batch_size_per_card:lite_train_lite_infer=16|whole_train_whole_infer=128 Train.loader.batch_size_per_card:lite_train_lite_infer=16|whole_train_whole_infer=128
Global.pretrained_model:pretrain_models/ch_PP-OCRv2_rec_train/best_accuracy Global.pretrained_model:pretrain_models/ch_PP-OCRv2_rec_train/best_accuracy
......
===========================kl_quant_params=========================== ===========================kl_quant_params===========================
model_name:PPOCRv3_ocr_det_kl model_name:ch_PP-OCRv3_det_KL
python:python3.7 python:python3.7
Global.pretrained_model:null Global.pretrained_model:null
Global.save_inference_dir:null Global.save_inference_dir:null
...@@ -8,10 +8,10 @@ infer_export:deploy/slim/quantization/quant_kl.py -c configs/det/ch_PP-OCRv3/ch_ ...@@ -8,10 +8,10 @@ infer_export:deploy/slim/quantization/quant_kl.py -c configs/det/ch_PP-OCRv3/ch_
infer_quant:True infer_quant:True
inference:tools/infer/predict_det.py inference:tools/infer/predict_det.py
--use_gpu:False|True --use_gpu:False|True
--enable_mkldnn:True --enable_mkldnn:False
--cpu_threads:1|6 --cpu_threads:6
--rec_batch_num:1 --rec_batch_num:1
--use_tensorrt:False|True --use_tensorrt:False
--precision:int8 --precision:int8
--det_model_dir: --det_model_dir:
--image_dir:./inference/ch_det_data_50/all-sum-510/ --image_dir:./inference/ch_det_data_50/all-sum-510/
......
===========================kl_quant_params=========================== ===========================kl_quant_params===========================
model_name:PPOCRv3_ocr_rec_kl model_name:ch_PP-OCRv3_rec_KL
python:python3.7 python:python3.7
Global.pretrained_model:null Global.pretrained_model:
Global.save_inference_dir:null Global.save_inference_dir:null
infer_model:./inference/ch_PP-OCRv3_rec_infer/ infer_model:./inference/ch_PP-OCRv3_rec_infer/
infer_export:deploy/slim/quantization/quant_kl.py -c test_tipc/configs/ch_PP-OCRv3_rec/ch_PP-OCRv3_rec_distillation.yml -o infer_export:deploy/slim/quantization/quant_kl.py -c test_tipc/configs/ch_PP-OCRv3_rec/ch_PP-OCRv3_rec_distillation.yml -o
infer_quant:True infer_quant:True
inference:tools/infer/predict_rec.py --rec_image_shape="3,48,320" inference:tools/infer/predict_rec.py --rec_image_shape="3,48,320"
--use_gpu:False|True --use_gpu:False|True
--enable_mkldnn:False|True --enable_mkldnn:False
--cpu_threads:1|6 --cpu_threads:6
--rec_batch_num:1|6 --rec_batch_num:1|6
--use_tensorrt:True --use_tensorrt:False
--precision:int8 --precision:int8
--rec_model_dir: --rec_model_dir:
--image_dir:./inference/rec_inference --image_dir:./inference/rec_inference
......
...@@ -4,7 +4,7 @@ python:python3.7 ...@@ -4,7 +4,7 @@ python:python3.7
gpu_list:0|0,1 gpu_list:0|0,1
Global.use_gpu:True|True Global.use_gpu:True|True
Global.auto_cast:fp32 Global.auto_cast:fp32
Global.epoch_num:lite_train_lite_infer=6|whole_train_whole_infer=50 Global.epoch_num:lite_train_lite_infer=1|whole_train_whole_infer=50
Global.save_model_dir:./output/ Global.save_model_dir:./output/
Train.loader.batch_size_per_card:lite_train_lite_infer=16|whole_train_whole_infer=128 Train.loader.batch_size_per_card:lite_train_lite_infer=16|whole_train_whole_infer=128
Global.pretrained_model:pretrain_models/ch_PP-OCRv3_rec_train/best_accuracy Global.pretrained_model:pretrain_models/ch_PP-OCRv3_rec_train/best_accuracy
......
...@@ -8,10 +8,10 @@ infer_export:deploy/slim/quantization/quant_kl.py -c configs/det/ch_ppocr_v2.0/c ...@@ -8,10 +8,10 @@ infer_export:deploy/slim/quantization/quant_kl.py -c configs/det/ch_ppocr_v2.0/c
infer_quant:True infer_quant:True
inference:tools/infer/predict_det.py inference:tools/infer/predict_det.py
--use_gpu:False|True --use_gpu:False|True
--enable_mkldnn:True --enable_mkldnn:False
--cpu_threads:1|6 --cpu_threads:6
--rec_batch_num:1 --rec_batch_num:1
--use_tensorrt:False|True --use_tensorrt:False
--precision:int8 --precision:int8
--det_model_dir: --det_model_dir:
--image_dir:./inference/ch_det_data_50/all-sum-510/ --image_dir:./inference/ch_det_data_50/all-sum-510/
......
...@@ -4,7 +4,7 @@ python:python3.7 ...@@ -4,7 +4,7 @@ python:python3.7
gpu_list:0|0,1 gpu_list:0|0,1
Global.use_gpu:True|True Global.use_gpu:True|True
Global.auto_cast:null Global.auto_cast:null
Global.epoch_num:lite_train_lite_infer=20|whole_train_whole_infer=50 Global.epoch_num:lite_train_lite_infer=2|whole_train_whole_infer=50
Global.save_model_dir:./output/ Global.save_model_dir:./output/
Train.loader.batch_size_per_card:lite_train_lite_infer=2|whole_train_whole_infer=4 Train.loader.batch_size_per_card:lite_train_lite_infer=2|whole_train_whole_infer=4
Global.pretrained_model:null Global.pretrained_model:null
......
...@@ -6,12 +6,12 @@ Global.save_inference_dir:null ...@@ -6,12 +6,12 @@ Global.save_inference_dir:null
infer_model:./inference/ch_ppocr_mobile_v2.0_rec_infer/ infer_model:./inference/ch_ppocr_mobile_v2.0_rec_infer/
infer_export:deploy/slim/quantization/quant_kl.py -c test_tipc/configs/ch_ppocr_mobile_v2.0_rec_KL/rec_chinese_lite_train_v2.0.yml -o infer_export:deploy/slim/quantization/quant_kl.py -c test_tipc/configs/ch_ppocr_mobile_v2.0_rec_KL/rec_chinese_lite_train_v2.0.yml -o
infer_quant:True infer_quant:True
inference:tools/infer/predict_rec.py inference:tools/infer/predict_rec.py --rec_image_shape="3,32,320"
--use_gpu:False|True --use_gpu:False|True
--enable_mkldnn:True --enable_mkldnn:False
--cpu_threads:1|6 --cpu_threads:6
--rec_batch_num:1 --rec_batch_num:1
--use_tensorrt:False|True --use_tensorrt:False
--precision:int8 --precision:int8
--rec_model_dir: --rec_model_dir:
--image_dir:./inference/rec_inference --image_dir:./inference/rec_inference
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册