rename quant and prune
This commit is contained in:
parent
868d3062ab
commit
777857ec89
|
@ -76,7 +76,7 @@ for train_model in ${train_model_list[*]}; do
|
||||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_rec_train.tar
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_rec_train.tar
|
||||||
cd ./inference && tar xf ${eval_model_name}.tar && cd ../
|
cd ./inference && tar xf ${eval_model_name}.tar && cd ../
|
||||||
fi
|
fi
|
||||||
elif [ ${slim_trainer} = "quant" ]; then
|
elif [ ${slim_trainer} = "pact" ]; then
|
||||||
if [ ${model_name} = "det" ]; then
|
if [ ${model_name} = "det" ]; then
|
||||||
eval_model_name="ch_ppocr_mobile_v2.0_det_quant_train"
|
eval_model_name="ch_ppocr_mobile_v2.0_det_quant_train"
|
||||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/slim/ch_ppocr_mobile_v2.0_det_quant_train.tar
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/slim/ch_ppocr_mobile_v2.0_det_quant_train.tar
|
||||||
|
@ -96,7 +96,7 @@ for train_model in ${train_model_list[*]}; do
|
||||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/slim/ch_ppocr_mobile_v2.0_rec_distill_train.tar
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/slim/ch_ppocr_mobile_v2.0_rec_distill_train.tar
|
||||||
cd ./inference && tar xf ${eval_model_name}.tar && cd ../
|
cd ./inference && tar xf ${eval_model_name}.tar && cd ../
|
||||||
fi
|
fi
|
||||||
elif [ ${slim_trainer} = "prune" ]; then
|
elif [ ${slim_trainer} = "fpgm" ]; then
|
||||||
if [ ${model_name} = "det" ]; then
|
if [ ${model_name} = "det" ]; then
|
||||||
eval_model_name="ch_ppocr_mobile_v2.0_det_prune_train"
|
eval_model_name="ch_ppocr_mobile_v2.0_det_prune_train"
|
||||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/slim/ch_ppocr_mobile_v2.0_det_prune_train.tar
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/slim/ch_ppocr_mobile_v2.0_det_prune_train.tar
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
train_model_list: ocr_det
|
train_model_list: ocr_det
|
||||||
gpu_list: -1|0|0,1
|
gpu_list: -1|0|0,1
|
||||||
auto_cast_list: False
|
auto_cast_list: False|True
|
||||||
trainer_list: norm|quant
|
trainer_list: norm|pact|fpgm
|
||||||
python: python3.7
|
python: python3.7
|
||||||
|
|
||||||
inference: python
|
inference: python
|
||||||
|
|
|
@ -75,6 +75,7 @@ ${python} -m pip install psutil;
|
||||||
${python} -m pip install GPUtil;
|
${python} -m pip install GPUtil;
|
||||||
${python} -m pip install paddlesim==2.0.0
|
${python} -m pip install paddlesim==2.0.0
|
||||||
|
|
||||||
|
|
||||||
function status_check(){
|
function status_check(){
|
||||||
last_status=$1 # the exit code
|
last_status=$1 # the exit code
|
||||||
run_model=$2
|
run_model=$2
|
||||||
|
@ -119,11 +120,11 @@ for train_model in ${train_model_list[*]}; do
|
||||||
trainer="tools/train.py"
|
trainer="tools/train.py"
|
||||||
export_model="tools/export_model.py"
|
export_model="tools/export_model.py"
|
||||||
pretrain="./pretrain_models/MobileNetV3_large_x0_5_pretrained"
|
pretrain="./pretrain_models/MobileNetV3_large_x0_5_pretrained"
|
||||||
elif [ ${slim_trainer} = "quant" ]; then
|
elif [ ${slim_trainer} = "pact" ]; then
|
||||||
trainer="deploy/slim/quantization/quant.py"
|
trainer="deploy/slim/quantization/quant.py"
|
||||||
export_model="deploy/slim/quantization/export_model.py"
|
export_model="deploy/slim/quantization/export_model.py"
|
||||||
pretrain="./pretrain_models/det_mv3_db_v2.0_train/best_accuracy"
|
pretrain="./pretrain_models/det_mv3_db_v2.0_train/best_accuracy"
|
||||||
elif [ ${slim_trainer} = "prune" ]; then
|
elif [ ${slim_trainer} = "fpgm" ]; then
|
||||||
trainer="deploy/slim/prune/sensitivity_anal.py"
|
trainer="deploy/slim/prune/sensitivity_anal.py"
|
||||||
export_model="deploy/slim/prune/export_prune_model.py"
|
export_model="deploy/slim/prune/export_prune_model.py"
|
||||||
pretrain="./pretrain_models/det_mv3_db_v2.0_train/best_accuracy"
|
pretrain="./pretrain_models/det_mv3_db_v2.0_train/best_accuracy"
|
||||||
|
|
Loading…
Reference in New Issue