Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
paddle_dbnet
Commits
777857ec
Commit
777857ec
authored
Jun 17, 2021
by
LDOUBLEV
Browse files
rename quant and prune
parent
868d3062
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
+7
-6
test/infer.sh
test/infer.sh
+2
-2
test/paddleocr_ci_params.txt
test/paddleocr_ci_params.txt
+2
-2
test/test.sh
test/test.sh
+3
-2
No files found.
test/infer.sh
View file @
777857ec
...
@@ -76,7 +76,7 @@ for train_model in ${train_model_list[*]}; do
...
@@ -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
}
=
"
quan
t"
]
;
then
elif
[
${
slim_trainer
}
=
"
pac
t"
]
;
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
...
@@ -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
...
...
test/paddleocr_ci_params.txt
View file @
777857ec
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
...
...
test/test.sh
View file @
777857ec
...
@@ -75,6 +75,7 @@ ${python} -m pip install psutil;
...
@@ -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
...
@@ -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
}
=
"
quan
t"
]
;
then
elif
[
${
slim_trainer
}
=
"
pac
t"
]
;
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"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment