Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_41840029
PaddleOCR
提交
f140143f
P
PaddleOCR
项目概览
weixin_41840029
/
PaddleOCR
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleOCR
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleOCR
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
f140143f
编写于
6月 22, 2022
作者:
A
andyjpaddle
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update log
上级
0b080f39
变更
18
隐藏空白更改
内联
并排
Showing
18 changed file
with
49 addition
and
393 deletion
+49
-393
test_tipc/configs/ch_PP-OCRv2_det/train_pact_infer_python.txt
..._tipc/configs/ch_PP-OCRv2_det/train_pact_infer_python.txt
+0
-0
test_tipc/configs/ch_PP-OCRv2_det_PACT/train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
...train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
+0
-53
test_tipc/configs/ch_PP-OCRv2_rec/train_pact_infer_python.txt
..._tipc/configs/ch_PP-OCRv2_rec/train_pact_infer_python.txt
+0
-0
test_tipc/configs/ch_PP-OCRv2_rec_PACT/train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
...train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
+0
-53
test_tipc/configs/ch_PP-OCRv3_det/train_pact_infer_python.txt
..._tipc/configs/ch_PP-OCRv3_det/train_pact_infer_python.txt
+0
-0
test_tipc/configs/ch_PP-OCRv3_det_PACT/train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
...train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
+0
-53
test_tipc/configs/ch_PP-OCRv3_rec/train_pact_infer_python.txt
..._tipc/configs/ch_PP-OCRv3_rec/train_pact_infer_python.txt
+0
-0
test_tipc/configs/ch_ppocr_mobile_v2.0_det/train_pact_infer_python.txt
...figs/ch_ppocr_mobile_v2.0_det/train_pact_infer_python.txt
+0
-0
test_tipc/configs/ch_ppocr_mobile_v2.0_det_PACT/train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
...train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
+0
-53
test_tipc/configs/ch_ppocr_mobile_v2.0_rec/train_pact_infer_python.txt
...figs/ch_ppocr_mobile_v2.0_rec/train_pact_infer_python.txt
+0
-0
test_tipc/configs/ch_ppocr_mobile_v2.0_rec_PACT/train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
...train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
+0
-53
test_tipc/configs/en_table_structure/train_pact_infer_python.txt
...pc/configs/en_table_structure/train_pact_infer_python.txt
+0
-0
test_tipc/configs/en_table_structure_PACT/train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
...train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
+0
-53
test_tipc/test_paddle2onnx.sh
test_tipc/test_paddle2onnx.sh
+8
-4
test_tipc/test_ptq_inference_python.sh
test_tipc/test_ptq_inference_python.sh
+2
-1
test_tipc/test_serving_infer_cpp.sh
test_tipc/test_serving_infer_cpp.sh
+11
-6
test_tipc/test_serving_infer_python.sh
test_tipc/test_serving_infer_python.sh
+18
-12
test_tipc/test_train_inference_python.sh
test_tipc/test_train_inference_python.sh
+10
-52
未找到文件。
test_tipc/configs/ch_PP-OCRv2_det
_PACT
/train_pact_infer_python.txt
→
test_tipc/configs/ch_PP-OCRv2_det/train_pact_infer_python.txt
浏览文件 @
f140143f
文件已移动
test_tipc/configs/ch_PP-OCRv2_det_PACT/train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
已删除
100644 → 0
浏览文件 @
0b080f39
===========================train_params===========================
model_name:ch_PP-OCRv2_det_PACT
python:python3.7
gpu_list:0|0,1
Global.use_gpu:True|True
Global.auto_cast:amp
Global.epoch_num:lite_train_lite_infer=1|whole_train_whole_infer=50
Global.save_model_dir:./output/
Train.loader.batch_size_per_card:lite_train_lite_infer=2|whole_train_whole_infer=4
Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./train_data/icdar2015/text_localization/ch4_test_images/
null:null
##
trainer:pact_train
norm_train:null
pact_train:deploy/slim/quantization/quant.py -c configs/det/ch_PP-OCRv2/ch_PP-OCRv2_det_cml.yml -o
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:null
null:null
##
===========================infer_params===========================
Global.save_inference_dir:./output/
Global.checkpoints:
norm_export:null
quant_export:deploy/slim/quantization/export_model.py -c configs/det/ch_PP-OCRv2/ch_PP-OCRv2_det_cml.yml -o
fpgm_export:
distill_export:null
export1:null
export2:null
inference_dir:Student
infer_model:./inference/ch_PP-OCRv2_det_infer/
infer_export:null
infer_quant:False
inference:tools/infer/predict_det.py
--use_gpu:True|False
--enable_mkldnn:False
--cpu_threads:6
--rec_batch_num:1
--use_tensorrt:False
--precision:fp32
--det_model_dir:
--image_dir:./inference/ch_det_data_50/all-sum-510/
null:null
--benchmark:True
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,640,640]}];[{float32,[3,960,960]}]
test_tipc/configs/ch_PP-OCRv2_rec
_PACT
/train_pact_infer_python.txt
→
test_tipc/configs/ch_PP-OCRv2_rec/train_pact_infer_python.txt
浏览文件 @
f140143f
文件已移动
test_tipc/configs/ch_PP-OCRv2_rec_PACT/train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
已删除
100644 → 0
浏览文件 @
0b080f39
===========================train_params===========================
model_name:ch_PP-OCRv2_rec_PACT
python:python3.7
gpu_list:0|0,1
Global.use_gpu:True|True
Global.auto_cast:amp
Global.epoch_num:lite_train_lite_infer=1|whole_train_whole_infer=50
Global.save_model_dir:./output/
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
train_model_name:latest
train_infer_img_dir:./inference/rec_inference
null:null
##
trainer:pact_train
norm_train:null
pact_train:deploy/slim/quantization/quant.py -c test_tipc/configs/ch_PP-OCRv2_rec/ch_PP-OCRv2_rec_distillation.yml -o
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:null
null:null
##
===========================infer_params===========================
Global.save_inference_dir:./output/
Global.checkpoints:
norm_export:null
quant_export:deploy/slim/quantization/export_model.py -c test_tipc/configs/ch_PP-OCRv2_rec/ch_PP-OCRv2_rec_distillation.yml -o
fpgm_export: null
distill_export:null
export1:null
export2:null
inference_dir:Student
infer_model:./inference/ch_PP-OCRv2_rec_slim_quant_infer
infer_export:null
infer_quant:True
inference:tools/infer/predict_rec.py
--use_gpu:True|False
--enable_mkldnn:False
--cpu_threads:6
--rec_batch_num:1|6
--use_tensorrt:False
--precision:fp32
--rec_model_dir:
--image_dir:./inference/rec_inference
null:null
--benchmark:True
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,32,320]}]
test_tipc/configs/ch_PP-OCRv3_det
_PACT
/train_pact_infer_python.txt
→
test_tipc/configs/ch_PP-OCRv3_det/train_pact_infer_python.txt
浏览文件 @
f140143f
文件已移动
test_tipc/configs/ch_PP-OCRv3_det_PACT/train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
已删除
100644 → 0
浏览文件 @
0b080f39
===========================train_params===========================
model_name:ch_PP-OCRv3_det_PACT
python:python3.7
gpu_list:0|0,1
Global.use_gpu:True|True
Global.auto_cast:amp
Global.epoch_num:lite_train_lite_infer=1|whole_train_whole_infer=50
Global.save_model_dir:./output/
Train.loader.batch_size_per_card:lite_train_lite_infer=2|whole_train_whole_infer=4
Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./train_data/icdar2015/text_localization/ch4_test_images/
null:null
##
trainer:pact_train
norm_train:null
pact_train:deploy/slim/quantization/quant.py -c configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_cml.yml -o
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:null
null:null
##
===========================infer_params===========================
Global.save_inference_dir:./output/
Global.checkpoints:
norm_export:null
quant_export:deploy/slim/quantization/export_model.py -c configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_cml.yml -o
fpgm_export:
distill_export:null
export1:null
export2:null
inference_dir:Student
infer_model:./inference/ch_PP-OCRv3_det_infer/
infer_export:null
infer_quant:False
inference:tools/infer/predict_det.py
--use_gpu:True|False
--enable_mkldnn:False
--cpu_threads:6
--rec_batch_num:1
--use_tensorrt:False
--precision:fp32
--det_model_dir:
--image_dir:./inference/ch_det_data_50/all-sum-510/
null:null
--benchmark:True
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,640,640]}];[{float32,[3,960,960]}]
test_tipc/configs/ch_PP-OCRv3_rec
_PACT
/train_pact_infer_python.txt
→
test_tipc/configs/ch_PP-OCRv3_rec/train_pact_infer_python.txt
浏览文件 @
f140143f
文件已移动
test_tipc/configs/ch_ppocr_mobile_v2.0_det
_PACT
/train_pact_infer_python.txt
→
test_tipc/configs/ch_ppocr_mobile_v2.0_det/train_pact_infer_python.txt
浏览文件 @
f140143f
文件已移动
test_tipc/configs/ch_ppocr_mobile_v2.0_det_PACT/train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
已删除
100644 → 0
浏览文件 @
0b080f39
===========================train_params===========================
model_name:ch_ppocr_mobile_v2.0_det_PACT
python:python3.7
gpu_list:0|0,1
Global.use_gpu:True|True
Global.auto_cast:amp
Global.epoch_num:lite_train_lite_infer=2|whole_train_whole_infer=50
Global.save_model_dir:./output/
Train.loader.batch_size_per_card:lite_train_lite_infer=2|whole_train_whole_infer=4
Global.pretrained_model:null
train_model_name:latest
train_infer_img_dir:./train_data/icdar2015/text_localization/ch4_test_images/
null:null
##
trainer:pact_train
norm_train:null
pact_train:deploy/slim/quantization/quant.py -c configs/det/ch_ppocr_v2.0/ch_det_mv3_db_v2.0.yml -o
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:null
null:null
##
===========================infer_params===========================
Global.save_inference_dir:./output/
Global.checkpoints:
norm_export:null
quant_export:deploy/slim/quantization/export_model.py -c configs/det/ch_ppocr_v2.0/ch_det_mv3_db_v2.0.yml -o
fpgm_export:null
distill_export:null
export1:null
export2:null
inference_dir:null
train_model:./inference/ch_ppocr_mobile_v2.0_det_prune_infer/
infer_export:null
infer_quant:False
inference:tools/infer/predict_det.py
--use_gpu:True|False
--enable_mkldnn:False
--cpu_threads:6
--rec_batch_num:1
--use_tensorrt:False
--precision:fp32
--det_model_dir:
--image_dir:./inference/ch_det_data_50/all-sum-510/
null:null
--benchmark:True
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,640,640]}];[{float32,[3,960,960]}]
test_tipc/configs/ch_ppocr_mobile_v2.0_rec
_PACT
/train_pact_infer_python.txt
→
test_tipc/configs/ch_ppocr_mobile_v2.0_rec/train_pact_infer_python.txt
浏览文件 @
f140143f
文件已移动
test_tipc/configs/ch_ppocr_mobile_v2.0_rec_PACT/train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
已删除
100644 → 0
浏览文件 @
0b080f39
===========================train_params===========================
model_name:ch_ppocr_mobile_v2.0_rec_PACT
python:python3.7
gpu_list:0
Global.use_gpu:True|True
Global.auto_cast:amp
Global.epoch_num:lite_train_lite_infer=1|whole_train_whole_infer=50
Global.save_model_dir:./output/
Train.loader.batch_size_per_card:lite_train_lite_infer=128|whole_train_whole_infer=128
Global.checkpoints:null
train_model_name:latest
train_infer_img_dir:./train_data/ic15_data/test/word_1.png
null:null
##
trainer:pact_train
norm_train:null
pact_train:deploy/slim/quantization/quant.py -c test_tipc/configs/ch_ppocr_mobile_v2.0_rec_PACT/rec_chinese_lite_train_v2.0.yml -o
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:null
null:null
##
===========================infer_params===========================
Global.save_inference_dir:./output/
Global.checkpoints:
norm_export:null
quant_export:deploy/slim/quantization/export_model.py -c test_tipc/configs/ch_ppocr_mobile_v2.0_rec_PACT/rec_chinese_lite_train_v2.0.yml -o
fpgm_export:null
distill_export:null
export1:null
export2:null
inference_dir:null
infer_model:./inference/ch_ppocr_mobile_v2.0_rec_slim_infer/
infer_export:null
infer_quant:False
inference:tools/infer/predict_rec.py --rec_char_dict_path=./ppocr/utils/ppocr_keys_v1.txt --rec_image_shape="3,32,100"
--use_gpu:True|False
--enable_mkldnn:False
--cpu_threads:6
--rec_batch_num:1|6
--use_tensorrt:False
--precision:fp32
--rec_model_dir:
--image_dir:./inference/rec_inference
--save_log_path:./test/output/
--benchmark:True
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,32,320]}]
test_tipc/configs/en_table_structure
_PACT
/train_pact_infer_python.txt
→
test_tipc/configs/en_table_structure/train_pact_infer_python.txt
浏览文件 @
f140143f
文件已移动
test_tipc/configs/en_table_structure_PACT/train_linux_gpu_normal_amp_infer_python_linux_gpu_cpu.txt
已删除
100644 → 0
浏览文件 @
0b080f39
===========================train_params===========================
model_name:en_table_structure_PACT
python:python3.7
gpu_list:0|0,1
Global.use_gpu:True|True
Global.auto_cast:amp
Global.epoch_num:lite_train_lite_infer=1|whole_train_whole_infer=50
Global.save_model_dir:./output/
Train.loader.batch_size_per_card:lite_train_lite_infer=16|whole_train_whole_infer=128
Global.pretrained_model:./pretrain_models/en_ppocr_mobile_v2.0_table_structure_train/best_accuracy
train_model_name:latest
train_infer_img_dir:./ppstructure/docs/table/table.jpg
null:null
##
trainer:pact_train
norm_train:null
pact_train:deploy/slim/quantization/quant.py -c test_tipc/configs/en_table_structure/table_mv3.yml -o
fpgm_train:null
distill_train:null
null:null
null:null
##
===========================eval_params===========================
eval:null
null:null
##
===========================infer_params===========================
Global.save_inference_dir:./output/
Global.checkpoints:
norm_export:null
quant_export:deploy/slim/quantization/export_model.py -c test_tipc/configs/en_table_structure/table_mv3.yml -o
fpgm_export:
distill_export:null
export1:null
export2:null
##
infer_model:./inference/en_ppocr_mobile_v2.0_table_structure_infer
infer_export:null
infer_quant:True
inference:ppstructure/table/predict_table.py --det_model_dir=./inference/en_ppocr_mobile_v2.0_table_det_infer --rec_model_dir=./inference/en_ppocr_mobile_v2.0_table_rec_infer --rec_char_dict_path=./ppocr/utils/dict/table_dict.txt --table_char_dict_path=./ppocr/utils/dict/table_structure_dict.txt --image_dir=./ppstructure/docs/table/table.jpg --det_limit_side_len=736 --det_limit_type=min --output ./output/table
--use_gpu:True|False
--enable_mkldnn:False
--cpu_threads:6
--rec_batch_num:1
--use_tensorrt:False
--precision:fp32
--table_model_dir:
--image_dir:./ppstructure/docs/table/table.jpg
null:null
--benchmark:False
null:null
===========================infer_benchmark_params==========================
random_infer_input:[{float32,[3,488,488]}]
test_tipc/test_paddle2onnx.sh
浏览文件 @
f140143f
...
...
@@ -62,7 +62,8 @@ function func_paddle2onnx(){
set_save_model
=
$(
func_set_params
"--save_file"
"
${
det_save_file_value
}
"
)
set_opset_version
=
$(
func_set_params
"
${
opset_version_key
}
"
"
${
opset_version_value
}
"
)
set_enable_onnx_checker
=
$(
func_set_params
"
${
enable_onnx_checker_key
}
"
"
${
enable_onnx_checker_value
}
"
)
trans_model_cmd
=
"
${
padlle2onnx_cmd
}
${
set_dirname
}
${
set_model_filename
}
${
set_params_filename
}
${
set_save_model
}
${
set_opset_version
}
${
set_enable_onnx_checker
}
"
trans_det_log
=
"
${
LOG_PATH
}
/trans_model_det.log"
trans_model_cmd
=
"
${
padlle2onnx_cmd
}
${
set_dirname
}
${
set_model_filename
}
${
set_params_filename
}
${
set_save_model
}
${
set_opset_version
}
${
set_enable_onnx_checker
}
>
${
trans_det_log
}
2>&1 "
eval
$trans_model_cmd
last_status
=
${
PIPESTATUS
[0]
}
status_check
$last_status
"
${
trans_model_cmd
}
"
"
${
status_log
}
"
"
${
model_name
}
"
...
...
@@ -73,7 +74,8 @@ function func_paddle2onnx(){
set_save_model
=
$(
func_set_params
"--save_file"
"
${
rec_save_file_value
}
"
)
set_opset_version
=
$(
func_set_params
"
${
opset_version_key
}
"
"
${
opset_version_value
}
"
)
set_enable_onnx_checker
=
$(
func_set_params
"
${
enable_onnx_checker_key
}
"
"
${
enable_onnx_checker_value
}
"
)
trans_model_cmd
=
"
${
padlle2onnx_cmd
}
${
set_dirname
}
${
set_model_filename
}
${
set_params_filename
}
${
set_save_model
}
${
set_opset_version
}
${
set_enable_onnx_checker
}
"
trans_rec_log
=
"
${
LOG_PATH
}
/trans_model_rec.log"
trans_model_cmd
=
"
${
padlle2onnx_cmd
}
${
set_dirname
}
${
set_model_filename
}
${
set_params_filename
}
${
set_save_model
}
${
set_opset_version
}
${
set_enable_onnx_checker
}
>
${
trans_rec_log
}
2>&1 "
eval
$trans_model_cmd
last_status
=
${
PIPESTATUS
[0]
}
status_check
$last_status
"
${
trans_model_cmd
}
"
"
${
status_log
}
"
"
${
model_name
}
"
...
...
@@ -85,7 +87,8 @@ function func_paddle2onnx(){
set_save_model
=
$(
func_set_params
"--save_file"
"
${
det_save_file_value
}
"
)
set_opset_version
=
$(
func_set_params
"
${
opset_version_key
}
"
"
${
opset_version_value
}
"
)
set_enable_onnx_checker
=
$(
func_set_params
"
${
enable_onnx_checker_key
}
"
"
${
enable_onnx_checker_value
}
"
)
trans_model_cmd
=
"
${
padlle2onnx_cmd
}
${
set_dirname
}
${
set_model_filename
}
${
set_params_filename
}
${
set_save_model
}
${
set_opset_version
}
${
set_enable_onnx_checker
}
"
trans_det_log
=
"
${
LOG_PATH
}
/trans_model_det.log"
trans_model_cmd
=
"
${
padlle2onnx_cmd
}
${
set_dirname
}
${
set_model_filename
}
${
set_params_filename
}
${
set_save_model
}
${
set_opset_version
}
${
set_enable_onnx_checker
}
>
${
trans_det_log
}
2>&1 "
eval
$trans_model_cmd
last_status
=
${
PIPESTATUS
[0]
}
status_check
$last_status
"
${
trans_model_cmd
}
"
"
${
status_log
}
"
"
${
model_name
}
"
...
...
@@ -97,7 +100,8 @@ function func_paddle2onnx(){
set_save_model
=
$(
func_set_params
"--save_file"
"
${
rec_save_file_value
}
"
)
set_opset_version
=
$(
func_set_params
"
${
opset_version_key
}
"
"
${
opset_version_value
}
"
)
set_enable_onnx_checker
=
$(
func_set_params
"
${
enable_onnx_checker_key
}
"
"
${
enable_onnx_checker_value
}
"
)
trans_model_cmd
=
"
${
padlle2onnx_cmd
}
${
set_dirname
}
${
set_model_filename
}
${
set_params_filename
}
${
set_save_model
}
${
set_opset_version
}
${
set_enable_onnx_checker
}
"
trans_rec_log
=
"
${
LOG_PATH
}
/trans_model_rec.log"
trans_model_cmd
=
"
${
padlle2onnx_cmd
}
${
set_dirname
}
${
set_model_filename
}
${
set_params_filename
}
${
set_save_model
}
${
set_opset_version
}
${
set_enable_onnx_checker
}
>
${
trans_rec_log
}
2>&1 "
eval
$trans_model_cmd
last_status
=
${
PIPESTATUS
[0]
}
status_check
$last_status
"
${
trans_model_cmd
}
"
"
${
status_log
}
"
"
${
model_name
}
"
...
...
test_tipc/test_ptq_inference_python.sh
浏览文件 @
f140143f
...
...
@@ -139,7 +139,8 @@ if [ ${MODE} = "whole_infer" ]; then
save_infer_dir
=
"
${
infer_model
}
_klquant"
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
}
"
export_log_path
=
"
${
LOG_PATH
}
/_export_
${
Count
}
.log"
export_cmd
=
"
${
python
}
${
infer_run_exports
[Count]
}
${
set_export_weight
}
${
set_save_infer_key
}
>
${
export_log_path
}
2>&1 "
echo
${
infer_run_exports
[Count]
}
echo
$export_cmd
eval
$export_cmd
...
...
test_tipc/test_serving_infer_cpp.sh
浏览文件 @
f140143f
...
...
@@ -70,7 +70,8 @@ function func_serving(){
set_serving_server
=
$(
func_set_params
"--serving_server"
"
${
det_serving_server_value
}
"
)
set_serving_client
=
$(
func_set_params
"--serving_client"
"
${
det_serving_client_value
}
"
)
python_list
=(
${
python_list
}
)
trans_model_cmd
=
"
${
python_list
[0]
}
${
trans_model_py
}
${
set_dirname
}
${
set_model_filename
}
${
set_params_filename
}
${
set_serving_server
}
${
set_serving_client
}
"
trans_det_log
=
"
${
LOG_PATH
}
/cpp_trans_model_det.log"
trans_model_cmd
=
"
${
python_list
[0]
}
${
trans_model_py
}
${
set_dirname
}
${
set_model_filename
}
${
set_params_filename
}
${
set_serving_server
}
${
set_serving_client
}
>
${
trans_det_log
}
2>&1 "
eval
$trans_model_cmd
cp
"deploy/pdserving/serving_client_conf.prototxt"
${
det_serving_client_value
}
# trans rec
...
...
@@ -78,7 +79,8 @@ function func_serving(){
set_serving_server
=
$(
func_set_params
"--serving_server"
"
${
rec_serving_server_value
}
"
)
set_serving_client
=
$(
func_set_params
"--serving_client"
"
${
rec_serving_client_value
}
"
)
python_list
=(
${
python_list
}
)
trans_model_cmd
=
"
${
python_list
[0]
}
${
trans_model_py
}
${
set_dirname
}
${
set_model_filename
}
${
set_params_filename
}
${
set_serving_server
}
${
set_serving_client
}
"
trans_rec_log
=
"
${
LOG_PATH
}
/cpp_trans_model_rec.log"
trans_model_cmd
=
"
${
python_list
[0]
}
${
trans_model_py
}
${
set_dirname
}
${
set_model_filename
}
${
set_params_filename
}
${
set_serving_server
}
${
set_serving_client
}
>
${
trans_rec_log
}
2>&1 "
eval
$trans_model_cmd
last_status
=
${
PIPESTATUS
[0]
}
status_check
$last_status
"
${
trans_model_cmd
}
"
"
${
status_log
}
"
"
${
model_name
}
"
...
...
@@ -88,22 +90,25 @@ function func_serving(){
# cpp serving
for
gpu_id
in
${
gpu_value
[*]
}
;
do
if
[
${
gpu_id
}
=
"null"
]
;
then
web_service_cpp_cmd
=
"
${
python_list
[0]
}
${
web_service_py
}
--model
${
det_server_value
}
${
rec_server_value
}
${
op_key
}
${
op_value
}
${
port_key
}
${
port_value
}
> serving_log_cpu.log &"
server_log_path
=
"
${
LOG_PATH
}
/cpp_server_cpu.log"
web_service_cpp_cmd
=
"
${
python_list
[0]
}
${
web_service_py
}
--model
${
det_server_value
}
${
rec_server_value
}
${
op_key
}
${
op_value
}
${
port_key
}
${
port_value
}
>
${
server_log_path
}
2>&1 "
eval
$web_service_cpp_cmd
last_status
=
${
PIPESTATUS
[0]
}
status_check
$last_status
"
${
web_service_cpp_cmd
}
"
"
${
status_log
}
"
"
${
model_name
}
"
sleep
5s
_save_log_path
=
"
${
LOG_PATH
}
/
server_infer_cpp
_cpu.log"
_save_log_path
=
"
${
LOG_PATH
}
/
cpp_client
_cpu.log"
cpp_client_cmd
=
"
${
python_list
[0]
}
${
cpp_client_py
}
${
det_client_value
}
${
rec_client_value
}
>
${
_save_log_path
}
2>&1"
eval
$cpp_client_cmd
last_status
=
${
PIPESTATUS
[0]
}
eval
"cat
${
_save_log_path
}
"
status_check
$last_status
"
${
cpp_client_cmd
}
"
"
${
status_log
}
"
"
${
model_name
}
"
ps ux |
grep
-i
${
port_value
}
|
awk
'{print $2}'
| xargs
kill
-s
9
else
web_service_cpp_cmd
=
"
${
python_list
[0]
}
${
web_service_py
}
--model
${
det_server_value
}
${
rec_server_value
}
${
op_key
}
${
op_value
}
${
port_key
}
${
port_value
}
${
gpu_key
}
${
gpu_id
}
> serving_log_gpu.log &"
server_log_path
=
"
${
LOG_PATH
}
/cpp_server_gpu.log"
web_service_cpp_cmd
=
"
${
python_list
[0]
}
${
web_service_py
}
--model
${
det_server_value
}
${
rec_server_value
}
${
op_key
}
${
op_value
}
${
port_key
}
${
port_value
}
${
gpu_key
}
${
gpu_id
}
>
${
server_log_path
}
2>&1 "
eval
$web_service_cpp_cmd
sleep
5s
_save_log_path
=
"
${
LOG_PATH
}
/
server_infer_cpp
_gpu.log"
_save_log_path
=
"
${
LOG_PATH
}
/
cpp_client
_gpu.log"
cpp_client_cmd
=
"
${
python_list
[0]
}
${
cpp_client_py
}
${
det_client_value
}
${
rec_client_value
}
>
${
_save_log_path
}
2>&1"
eval
$cpp_client_cmd
last_status
=
${
PIPESTATUS
[0]
}
...
...
test_tipc/test_serving_infer_python.sh
浏览文件 @
f140143f
...
...
@@ -77,14 +77,16 @@ function func_serving(){
set_serving_server
=
$(
func_set_params
"--serving_server"
"
${
det_serving_server_value
}
"
)
set_serving_client
=
$(
func_set_params
"--serving_client"
"
${
det_serving_client_value
}
"
)
python_list
=(
${
python_list
}
)
trans_model_cmd
=
"
${
python_list
[0]
}
${
trans_model_py
}
${
set_dirname
}
${
set_model_filename
}
${
set_params_filename
}
${
set_serving_server
}
${
set_serving_client
}
"
trans_det_log
=
"
${
LOG_PATH
}
/python_trans_model_det.log"
trans_model_cmd
=
"
${
python_list
[0]
}
${
trans_model_py
}
${
set_dirname
}
${
set_model_filename
}
${
set_params_filename
}
${
set_serving_server
}
${
set_serving_client
}
>
${
trans_det_log
}
2>&1 "
eval
$trans_model_cmd
# trans rec
set_dirname
=
$(
func_set_params
"--dirname"
"
${
rec_infer_model_dir_value
}
"
)
set_serving_server
=
$(
func_set_params
"--serving_server"
"
${
rec_serving_server_value
}
"
)
set_serving_client
=
$(
func_set_params
"--serving_client"
"
${
rec_serving_client_value
}
"
)
python_list
=(
${
python_list
}
)
trans_model_cmd
=
"
${
python_list
[0]
}
${
trans_model_py
}
${
set_dirname
}
${
set_model_filename
}
${
set_params_filename
}
${
set_serving_server
}
${
set_serving_client
}
"
trans_rec_log
=
"
${
LOG_PATH
}
/python_trans_model_rec.log"
trans_model_cmd
=
"
${
python_list
[0]
}
${
trans_model_py
}
${
set_dirname
}
${
set_model_filename
}
${
set_params_filename
}
${
set_serving_server
}
${
set_serving_client
}
>
${
trans_rec_log
}
2>&1 "
eval
$trans_model_cmd
elif
[[
${
model_name
}
=
~
"det"
]]
;
then
# trans det
...
...
@@ -92,7 +94,8 @@ function func_serving(){
set_serving_server
=
$(
func_set_params
"--serving_server"
"
${
det_serving_server_value
}
"
)
set_serving_client
=
$(
func_set_params
"--serving_client"
"
${
det_serving_client_value
}
"
)
python_list
=(
${
python_list
}
)
trans_model_cmd
=
"
${
python_list
[0]
}
${
trans_model_py
}
${
set_dirname
}
${
set_model_filename
}
${
set_params_filename
}
${
set_serving_server
}
${
set_serving_client
}
"
trans_det_log
=
"
${
LOG_PATH
}
/python_trans_model_det.log"
trans_model_cmd
=
"
${
python_list
[0]
}
${
trans_model_py
}
${
set_dirname
}
${
set_model_filename
}
${
set_params_filename
}
${
set_serving_server
}
${
set_serving_client
}
>
${
trans_det_log
}
2>&1 "
eval
$trans_model_cmd
elif
[[
${
model_name
}
=
~
"rec"
]]
;
then
# trans rec
...
...
@@ -100,7 +103,8 @@ function func_serving(){
set_serving_server
=
$(
func_set_params
"--serving_server"
"
${
rec_serving_server_value
}
"
)
set_serving_client
=
$(
func_set_params
"--serving_client"
"
${
rec_serving_client_value
}
"
)
python_list
=(
${
python_list
}
)
trans_model_cmd
=
"
${
python_list
[0]
}
${
trans_model_py
}
${
set_dirname
}
${
set_model_filename
}
${
set_params_filename
}
${
set_serving_server
}
${
set_serving_client
}
"
trans_rec_log
=
"
${
LOG_PATH
}
/python_trans_model_rec.log"
trans_model_cmd
=
"
${
python_list
[0]
}
${
trans_model_py
}
${
set_dirname
}
${
set_model_filename
}
${
set_params_filename
}
${
set_serving_server
}
${
set_serving_client
}
>
${
trans_rec_log
}
2>&1 "
eval
$trans_model_cmd
fi
set_image_dir
=
$(
func_set_params
"
${
image_dir_key
}
"
"
${
image_dir_value
}
"
)
...
...
@@ -115,29 +119,30 @@ function func_serving(){
for
use_mkldnn
in
${
web_use_mkldnn_list
[*]
}
;
do
for
threads
in
${
web_cpu_threads_list
[*]
}
;
do
set_cpu_threads
=
$(
func_set_params
"
${
web_cpu_threads_key
}
"
"
${
threads
}
"
)
server_log_path
=
"
${
LOG_PATH
}
/python_server_cpu_usemkldnn_
${
use_mkldnn
}
_threads_
${
threads
}
.log"
if
[
${
model_name
}
=
"ch_PP-OCRv2"
]
||
[
${
model_name
}
=
"ch_PP-OCRv3"
]
||
[
${
model_name
}
=
"ch_ppocr_mobile_v2.0"
]
||
[
${
model_name
}
=
"ch_ppocr_server_v2.0"
]
;
then
set_det_model_config
=
$(
func_set_params
"
${
det_server_key
}
"
"
${
det_server_value
}
"
)
set_rec_model_config
=
$(
func_set_params
"
${
rec_server_key
}
"
"
${
rec_server_value
}
"
)
web_service_cmd
=
"
${
python
}
${
web_service_py
}
${
web_use_gpu_key
}
=""
${
web_use_mkldnn_key
}
=
${
use_mkldnn
}
${
set_cpu_threads
}
${
set_det_model_config
}
${
set_rec_model_config
}
&
"
web_service_cmd
=
"
${
python
}
${
web_service_py
}
${
web_use_gpu_key
}
=""
${
web_use_mkldnn_key
}
=
${
use_mkldnn
}
${
set_cpu_threads
}
${
set_det_model_config
}
${
set_rec_model_config
}
>
${
server_log_path
}
2>&1
"
eval
$web_service_cmd
last_status
=
${
PIPESTATUS
[0]
}
status_check
$last_status
"
${
web_service_cmd
}
"
"
${
status_log
}
"
"
${
model_name
}
"
elif
[[
${
model_name
}
=
~
"det"
]]
;
then
set_det_model_config
=
$(
func_set_params
"
${
det_server_key
}
"
"
${
det_server_value
}
"
)
web_service_cmd
=
"
${
python
}
${
web_service_py
}
${
web_use_gpu_key
}
=""
${
web_use_mkldnn_key
}
=
${
use_mkldnn
}
${
set_cpu_threads
}
${
set_det_model_config
}
&
"
web_service_cmd
=
"
${
python
}
${
web_service_py
}
${
web_use_gpu_key
}
=""
${
web_use_mkldnn_key
}
=
${
use_mkldnn
}
${
set_cpu_threads
}
${
set_det_model_config
}
>
${
server_log_path
}
2>&1
"
eval
$web_service_cmd
last_status
=
${
PIPESTATUS
[0]
}
status_check
$last_status
"
${
web_service_cmd
}
"
"
${
status_log
}
"
"
${
model_name
}
"
elif
[[
${
model_name
}
=
~
"rec"
]]
;
then
set_rec_model_config
=
$(
func_set_params
"
${
rec_server_key
}
"
"
${
rec_server_value
}
"
)
web_service_cmd
=
"
${
python
}
${
web_service_py
}
${
web_use_gpu_key
}
=""
${
web_use_mkldnn_key
}
=
${
use_mkldnn
}
${
set_cpu_threads
}
${
set_rec_model_config
}
&
"
web_service_cmd
=
"
${
python
}
${
web_service_py
}
${
web_use_gpu_key
}
=""
${
web_use_mkldnn_key
}
=
${
use_mkldnn
}
${
set_cpu_threads
}
${
set_rec_model_config
}
>
${
server_log_path
}
2>&1
"
eval
$web_service_cmd
last_status
=
${
PIPESTATUS
[0]
}
status_check
$last_status
"
${
web_service_cmd
}
"
"
${
status_log
}
"
"
${
model_name
}
"
fi
sleep
2s
for
pipeline
in
${
pipeline_py
[*]
}
;
do
_save_log_path
=
"
${
LOG_PATH
}
/
server_infer
_cpu_
${
pipeline
%_client*
}
_usemkldnn_
${
use_mkldnn
}
_threads_
${
threads
}
_batchsize_1.log"
_save_log_path
=
"
${
LOG_PATH
}
/
python_client
_cpu_
${
pipeline
%_client*
}
_usemkldnn_
${
use_mkldnn
}
_threads_
${
threads
}
_batchsize_1.log"
pipeline_cmd
=
"
${
python
}
${
pipeline
}
${
set_image_dir
}
>
${
_save_log_path
}
2>&1 "
eval
$pipeline_cmd
last_status
=
${
PIPESTATUS
[0]
}
...
...
@@ -151,6 +156,7 @@ function func_serving(){
elif
[
${
use_gpu
}
=
"gpu"
]
;
then
for
use_trt
in
${
web_use_trt_list
[*]
}
;
do
for
precision
in
${
web_precision_list
[*]
}
;
do
server_log_path
=
"
${
LOG_PATH
}
/python_server_gpu_usetrt_
${
use_trt
}
_precision_
${
precision
}
.log"
if
[[
${
_flag_quant
}
=
"False"
]]
&&
[[
${
precision
}
=
~
"int8"
]]
;
then
continue
fi
...
...
@@ -168,26 +174,26 @@ function func_serving(){
if
[
${
model_name
}
=
"ch_PP-OCRv2"
]
||
[
${
model_name
}
=
"ch_PP-OCRv3"
]
||
[
${
model_name
}
=
"ch_ppocr_mobile_v2.0"
]
||
[
${
model_name
}
=
"ch_ppocr_server_v2.0"
]
;
then
set_det_model_config
=
$(
func_set_params
"
${
det_server_key
}
"
"
${
det_server_value
}
"
)
set_rec_model_config
=
$(
func_set_params
"
${
rec_server_key
}
"
"
${
rec_server_value
}
"
)
web_service_cmd
=
"
${
python
}
${
web_service_py
}
${
set_tensorrt
}
${
set_precision
}
${
set_det_model_config
}
${
set_rec_model_config
}
&
"
web_service_cmd
=
"
${
python
}
${
web_service_py
}
${
set_tensorrt
}
${
set_precision
}
${
set_det_model_config
}
${
set_rec_model_config
}
>
${
server_log_path
}
2>&1
"
eval
$web_service_cmd
last_status
=
${
PIPESTATUS
[0]
}
status_check
$last_status
"
${
web_service_cmd
}
"
"
${
status_log
}
"
"
${
model_name
}
"
elif
[[
${
model_name
}
=
~
"det"
]]
;
then
set_det_model_config
=
$(
func_set_params
"
${
det_server_key
}
"
"
${
det_server_value
}
"
)
web_service_cmd
=
"
${
python
}
${
web_service_py
}
${
set_tensorrt
}
${
set_precision
}
${
set_det_model_config
}
&
"
web_service_cmd
=
"
${
python
}
${
web_service_py
}
${
set_tensorrt
}
${
set_precision
}
${
set_det_model_config
}
>
${
server_log_path
}
2>&1
"
eval
$web_service_cmd
last_status
=
${
PIPESTATUS
[0]
}
status_check
$last_status
"
${
web_service_cmd
}
"
"
${
status_log
}
"
"
${
model_name
}
"
elif
[[
${
model_name
}
=
~
"rec"
]]
;
then
set_rec_model_config
=
$(
func_set_params
"
${
rec_server_key
}
"
"
${
rec_server_value
}
"
)
web_service_cmd
=
"
${
python
}
${
web_service_py
}
${
set_tensorrt
}
${
set_precision
}
${
set_rec_model_config
}
&
"
web_service_cmd
=
"
${
python
}
${
web_service_py
}
${
set_tensorrt
}
${
set_precision
}
${
set_rec_model_config
}
>
${
server_log_path
}
2>&1
"
eval
$web_service_cmd
last_status
=
${
PIPESTATUS
[0]
}
status_check
$last_status
"
${
web_service_cmd
}
"
"
${
status_log
}
"
"
${
model_name
}
"
fi
sleep
2s
for
pipeline
in
${
pipeline_py
[*]
}
;
do
_save_log_path
=
"
${
LOG_PATH
}
/
server_infer
_gpu_
${
pipeline
%_client*
}
_usetrt_
${
use_trt
}
_precision_
${
precision
}
_batchsize_1.log"
_save_log_path
=
"
${
LOG_PATH
}
/
python_client
_gpu_
${
pipeline
%_client*
}
_usetrt_
${
use_trt
}
_precision_
${
precision
}
_batchsize_1.log"
pipeline_cmd
=
"
${
python
}
${
pipeline
}
${
set_image_dir
}
>
${
_save_log_path
}
2>&1"
eval
$pipeline_cmd
last_status
=
${
PIPESTATUS
[0]
}
...
...
test_tipc/test_train_inference_python.sh
浏览文件 @
f140143f
...
...
@@ -2,7 +2,7 @@
source
test_tipc/common_func.sh
FILENAME
=
$1
# MODE be one of ['lite_train_lite_infer' 'lite_train_whole_infer' 'whole_train_whole_infer', 'whole_infer'
, 'klquant_whole_infer'
]
# MODE be one of ['lite_train_lite_infer' 'lite_train_whole_infer' 'whole_train_whole_infer', 'whole_infer']
MODE
=
$2
dataline
=
$(
awk
'NR==1, NR==51{print}'
$FILENAME
)
...
...
@@ -88,43 +88,6 @@ benchmark_value=$(func_parser_value "${lines[49]}")
infer_key1
=
$(
func_parser_key
"
${
lines
[50]
}
"
)
infer_value1
=
$(
func_parser_value
"
${
lines
[50]
}
"
)
# parser klquant_infer
if
[
${
MODE
}
=
"klquant_whole_infer"
]
;
then
dataline
=
$(
awk
'NR==1, NR==17{print}'
$FILENAME
)
lines
=(
${
dataline
}
)
model_name
=
$(
func_parser_value
"
${
lines
[1]
}
"
)
python
=
$(
func_parser_value
"
${
lines
[2]
}
"
)
export_weight
=
$(
func_parser_key
"
${
lines
[3]
}
"
)
save_infer_key
=
$(
func_parser_key
"
${
lines
[4]
}
"
)
# parser inference model
infer_model_dir_list
=
$(
func_parser_value
"
${
lines
[5]
}
"
)
infer_export_list
=
$(
func_parser_value
"
${
lines
[6]
}
"
)
infer_is_quant
=
$(
func_parser_value
"
${
lines
[7]
}
"
)
# parser inference
inference_py
=
$(
func_parser_value
"
${
lines
[8]
}
"
)
use_gpu_key
=
$(
func_parser_key
"
${
lines
[9]
}
"
)
use_gpu_list
=
$(
func_parser_value
"
${
lines
[9]
}
"
)
use_mkldnn_key
=
$(
func_parser_key
"
${
lines
[10]
}
"
)
use_mkldnn_list
=
$(
func_parser_value
"
${
lines
[10]
}
"
)
cpu_threads_key
=
$(
func_parser_key
"
${
lines
[11]
}
"
)
cpu_threads_list
=
$(
func_parser_value
"
${
lines
[11]
}
"
)
batch_size_key
=
$(
func_parser_key
"
${
lines
[12]
}
"
)
batch_size_list
=
$(
func_parser_value
"
${
lines
[12]
}
"
)
use_trt_key
=
$(
func_parser_key
"
${
lines
[13]
}
"
)
use_trt_list
=
$(
func_parser_value
"
${
lines
[13]
}
"
)
precision_key
=
$(
func_parser_key
"
${
lines
[14]
}
"
)
precision_list
=
$(
func_parser_value
"
${
lines
[14]
}
"
)
infer_model_key
=
$(
func_parser_key
"
${
lines
[15]
}
"
)
image_dir_key
=
$(
func_parser_key
"
${
lines
[16]
}
"
)
infer_img_dir
=
$(
func_parser_value
"
${
lines
[16]
}
"
)
save_log_key
=
$(
func_parser_key
"
${
lines
[17]
}
"
)
save_log_value
=
$(
func_parser_value
"
${
lines
[17]
}
"
)
benchmark_key
=
$(
func_parser_key
"
${
lines
[18]
}
"
)
benchmark_value
=
$(
func_parser_value
"
${
lines
[18]
}
"
)
infer_key1
=
$(
func_parser_key
"
${
lines
[19]
}
"
)
infer_value1
=
$(
func_parser_value
"
${
lines
[19]
}
"
)
fi
LOG_PATH
=
"./test_tipc/output/
${
model_name
}
/
${
MODE
}
"
mkdir
-p
${
LOG_PATH
}
status_log
=
"
${
LOG_PATH
}
/results_python.log"
...
...
@@ -211,7 +174,7 @@ function func_inference(){
done
}
if
[
${
MODE
}
=
"whole_infer"
]
||
[
${
MODE
}
=
"klquant_whole_infer"
]
;
then
if
[
${
MODE
}
=
"whole_infer"
]
;
then
GPUID
=
$3
if
[
${#
GPUID
}
-le
0
]
;
then
env
=
" "
...
...
@@ -226,16 +189,12 @@ if [ ${MODE} = "whole_infer" ] || [ ${MODE} = "klquant_whole_infer" ]; then
infer_quant_flag
=(
${
infer_is_quant
}
)
for
infer_model
in
${
infer_model_dir_list
[*]
}
;
do
# run export
if
[
${
infer_run_exports
[Count]
}
!=
"null"
]
;
then
if
[
${
MODE
}
=
"klquant_whole_infer"
]
;
then
save_infer_dir
=
"
${
infer_model
}
_klquant"
fi
if
[
${
MODE
}
=
"whole_infer"
]
;
then
save_infer_dir
=
"
${
infer_model
}
"
fi
if
[
${
infer_run_exports
[Count]
}
!=
"null"
]
;
then
save_infer_dir
=
"
${
infer_model
}
"
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
}
"
export_log_path
=
"
${
LOG_PATH
}
/_export_
${
Count
}
.log"
export_cmd
=
"
${
python
}
${
infer_run_exports
[Count]
}
${
set_export_weight
}
${
set_save_infer_key
}
>
${
export_log_path
}
2>&1 "
echo
${
infer_run_exports
[Count]
}
echo
$export_cmd
eval
$export_cmd
...
...
@@ -246,9 +205,6 @@ if [ ${MODE} = "whole_infer" ] || [ ${MODE} = "klquant_whole_infer" ]; then
fi
#run inference
is_quant
=
${
infer_quant_flag
[Count]
}
if
[
${
MODE
}
=
"klquant_whole_infer"
]
;
then
is_quant
=
"True"
fi
func_inference
"
${
python
}
"
"
${
inference_py
}
"
"
${
save_infer_dir
}
"
"
${
LOG_PATH
}
"
"
${
infer_img_dir
}
"
${
is_quant
}
Count
=
$((
$Count
+
1
))
done
...
...
@@ -347,7 +303,8 @@ else
if
[
${
eval_py
}
!=
"null"
]
;
then
eval
${
env
}
set_eval_params1
=
$(
func_set_params
"
${
eval_key1
}
"
"
${
eval_value1
}
"
)
eval_cmd
=
"
${
python
}
${
eval_py
}
${
set_eval_pretrain
}
${
set_use_gpu
}
${
set_eval_params1
}
"
eval_log_path
=
"
${
LOG_PATH
}
/
${
trainer
}
_gpus_
${
gpu
}
_autocast_
${
autocast
}
_nodes_
${
nodes
}
_eval.log"
eval_cmd
=
"
${
python
}
${
eval_py
}
${
set_eval_pretrain
}
${
set_use_gpu
}
${
set_eval_params1
}
>
${
eval_log_path
}
2>&1 "
eval
$eval_cmd
status_check
$?
"
${
eval_cmd
}
"
"
${
status_log
}
"
"
${
model_name
}
"
fi
...
...
@@ -355,9 +312,10 @@ else
if
[
${
run_export
}
!=
"null"
]
;
then
# run export model
save_infer_path
=
"
${
save_log
}
"
export_log_path
=
"
${
LOG_PATH
}
/
${
trainer
}
_gpus_
${
gpu
}
_autocast_
${
autocast
}
_nodes_
${
nodes
}
_export.log"
set_export_weight
=
$(
func_set_params
"
${
export_weight
}
"
"
${
save_log
}
/
${
train_model_name
}
"
)
set_save_infer_key
=
$(
func_set_params
"
${
save_infer_key
}
"
"
${
save_infer_path
}
"
)
export_cmd
=
"
${
python
}
${
run_export
}
${
set_export_weight
}
${
set_save_infer_key
}
"
export_cmd
=
"
${
python
}
${
run_export
}
${
set_export_weight
}
${
set_save_infer_key
}
>
${
export_log_path
}
2>&1
"
eval
$export_cmd
status_check
$?
"
${
export_cmd
}
"
"
${
status_log
}
"
"
${
model_name
}
"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录