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
cd53b915
Unverified
Commit
cd53b915
authored
Jul 06, 2021
by
Double_V
Committed by
GitHub
Jul 06, 2021
Browse files
Merge pull request #3272 from LDOUBLEV/test_ci_v6
set env
parents
4309b054
bf4e0f7a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
deploy/slim/quantization/export_model.py
deploy/slim/quantization/export_model.py
+1
-1
test/ocr_det_params.txt
test/ocr_det_params.txt
+1
-1
test/test.sh
test/test.sh
+4
-3
No files found.
deploy/slim/quantization/export_model.py
View file @
cd53b915
...
...
@@ -101,7 +101,7 @@ def main():
quanter
=
QAT
(
config
=
quant_config
)
quanter
.
quantize
(
model
)
init_model
(
config
,
model
,
logger
)
init_model
(
config
,
model
)
model
.
eval
()
# build metric
...
...
test/ocr_det_params.txt
View file @
cd53b915
...
...
@@ -17,7 +17,7 @@ distill_train:null
eval:tools/eval.py -c configs/det/det_mv3_db.yml -o
Global.save_inference_dir:./output/
Global.
checkpoints
:
Global.
pretrained_model
:
norm_export:tools/export_model.py -c configs/det/det_mv3_db.yml -o
quant_export:deploy/slim/quantization/export_model.py -c configs/det/det_mv3_db.yml -o
fpgm_export:deploy/slim/prune/export_prune_model.py
...
...
test/test.sh
View file @
cd53b915
...
...
@@ -101,7 +101,7 @@ function func_inference(){
for
use_mkldnn
in
${
use_mkldnn_list
[*]
}
;
do
for
threads
in
${
cpu_threads_list
[*]
}
;
do
for
batch_size
in
${
batch_size_list
[*]
}
;
do
_save_log_path
=
"
${
_log_path
}
/infer_cpu_usemkldnn_
${
use_mkldnn
}
_threads_
${
threads
}
_batchsize_
${
batch_size
}
"
_save_log_path
=
"
${
_log_path
}
/infer_cpu_usemkldnn_
${
use_mkldnn
}
_threads_
${
threads
}
_batchsize_
${
batch_size
}
.log
"
command
=
"
${
_python
}
${
_script
}
${
use_gpu_key
}
=
${
use_gpu
}
${
use_mkldnn_key
}
=
${
use_mkldnn
}
${
cpu_threads_key
}
=
${
threads
}
${
infer_model_key
}
=
${
_model_dir
}
${
batch_size_key
}
=
${
batch_size
}
${
image_dir_key
}
=
${
_img_dir
}
${
save_log_key
}
=
${
_save_log_path
}
--benchmark=True"
eval
$command
status_check
$?
"
${
command
}
"
"
${
status_log
}
"
...
...
@@ -115,7 +115,7 @@ function func_inference(){
continue
fi
for
batch_size
in
${
batch_size_list
[*]
}
;
do
_save_log_path
=
"
${
_log_path
}
/infer_gpu_usetrt_
${
use_trt
}
_precision_
${
precision
}
_batchsize_
${
batch_size
}
"
_save_log_path
=
"
${
_log_path
}
/infer_gpu_usetrt_
${
use_trt
}
_precision_
${
precision
}
_batchsize_
${
batch_size
}
.log
"
command
=
"
${
_python
}
${
_script
}
${
use_gpu_key
}
=
${
use_gpu
}
${
use_trt_key
}
=
${
use_trt
}
${
precision_key
}
=
${
precision
}
${
infer_model_key
}
=
${
_model_dir
}
${
batch_size_key
}
=
${
batch_size
}
${
image_dir_key
}
=
${
_img_dir
}
${
save_log_key
}
=
${
_save_log_path
}
--benchmark=True"
eval
$command
status_check
$?
"
${
command
}
"
"
${
status_log
}
"
...
...
@@ -136,6 +136,7 @@ for gpu in ${gpu_list[*]}; do
env
=
""
elif
[
${#
gpu
}
-le
1
]
;
then
env
=
"export CUDA_VISIBLE_DEVICES=
${
gpu
}
"
eval
${
env
}
elif
[
${#
gpu
}
-le
15
]
;
then
IFS
=
","
array
=(
${
gpu
}
)
...
...
@@ -215,7 +216,7 @@ for gpu in ${gpu_list[*]}; do
status_check
$?
"
${
export_cmd
}
"
"
${
status_log
}
"
#run inference
e
cho
$env
e
val
$env
save_infer_path
=
"
${
save_log
}
"
func_inference
"
${
python
}
"
"
${
inference_py
}
"
"
${
save_infer_path
}
"
"
${
LOG_PATH
}
"
"
${
infer_img_dir
}
"
done
...
...
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