未验证 提交 063afe02 编写于 作者: S shangliang Xu 提交者: GitHub

[TIPC] fix path and rcnn onnx (#5672)

* add copy model line

* update export_onnx_key, test=document_fix
上级 8dfe9bc7
......@@ -32,7 +32,7 @@ pact_export:tools/export_model.py -c configs/cascade_rcnn/cascade_mask_rcnn_r50_
fpgm_export:tools/export_model.py -c configs/cascade_rcnn/cascade_mask_rcnn_r50_fpn_1x_coco.yml --slim_config _template_fpgm -o
distill_export:null
export1:null
export2:null
export_onnx:null
kl_quant_export:tools/post_quant.py -c configs/cascade_rcnn/cascade_mask_rcnn_r50_fpn_1x_coco.yml --slim_config _template_kl_quant -o
##
infer_mode:norm
......
......@@ -32,7 +32,7 @@ pact_export:tools/export_model.py -c configs/cascade_rcnn/cascade_mask_rcnn_r50_
fpgm_export:tools/export_model.py -c configs/cascade_rcnn/cascade_mask_rcnn_r50_vd_fpn_ssld_1x_coco.yml --slim_config _template_fpgm -o
distill_export:null
export1:null
export2:null
export_onnx:null
kl_quant_export:tools/post_quant.py -c configs/cascade_rcnn/cascade_mask_rcnn_r50_vd_fpn_ssld_1x_coco.yml --slim_config _template_kl_quant -o
##
infer_mode:norm
......
......@@ -32,7 +32,7 @@ pact_export:tools/export_model.py -c configs/cascade_rcnn/cascade_rcnn_r50_fpn_1
fpgm_export:tools/export_model.py -c configs/cascade_rcnn/cascade_rcnn_r50_fpn_1x_coco.yml --slim_config _template_fpgm -o
distill_export:null
export1:null
export2:null
export_onnx:null
kl_quant_export:tools/post_quant.py -c configs/cascade_rcnn/cascade_rcnn_r50_fpn_1x_coco.yml --slim_config _template_kl_quant -o
##
infer_mode:norm
......
......@@ -32,7 +32,7 @@ pact_export:tools/export_model.py -c configs/cascade_rcnn/cascade_rcnn_r50_vd_fp
fpgm_export:tools/export_model.py -c configs/cascade_rcnn/cascade_rcnn_r50_vd_fpn_ssld_1x_coco.yml --slim_config _template_fpgm -o
distill_export:null
export1:null
export2:null
export_onnx:null
kl_quant_export:tools/post_quant.py -c configs/cascade_rcnn/cascade_rcnn_r50_vd_fpn_ssld_1x_coco.yml --slim_config _template_kl_quant -o
##
infer_mode:norm
......
......@@ -32,7 +32,7 @@ pact_export:tools/export_model.py -c configs/faster_rcnn/faster_rcnn_r101_1x_coc
fpgm_export:tools/export_model.py -c configs/faster_rcnn/faster_rcnn_r101_1x_coco.yml --slim_config _template_fpgm -o
distill_export:null
export1:null
export2:null
export_onnx:null
kl_quant_export:tools/post_quant.py -c configs/faster_rcnn/faster_rcnn_r101_1x_coco.yml --slim_config _template_kl_quant -o
##
infer_mode:norm
......
......@@ -32,7 +32,7 @@ pact_export:tools/export_model.py -c configs/faster_rcnn/faster_rcnn_r101_fpn_1x
fpgm_export:tools/export_model.py -c configs/faster_rcnn/faster_rcnn_r101_fpn_1x_coco.yml --slim_config _template_fpgm -o
distill_export:null
export1:null
export2:null
export_onnx:null
kl_quant_export:tools/post_quant.py -c configs/faster_rcnn/faster_rcnn_r101_fpn_1x_coco.yml --slim_config _template_kl_quant -o
##
infer_mode:norm
......
......@@ -32,7 +32,7 @@ pact_export:tools/export_model.py -c configs/faster_rcnn/faster_rcnn_r101_vd_fpn
fpgm_export:tools/export_model.py -c configs/faster_rcnn/faster_rcnn_r101_vd_fpn_1x_coco.yml --slim_config _template_fpgm -o
distill_export:null
export1:null
export2:null
export_onnx:null
kl_quant_export:tools/post_quant.py -c configs/faster_rcnn/faster_rcnn_r101_vd_fpn_1x_coco.yml --slim_config _template_kl_quant -o
##
infer_mode:norm
......
......@@ -32,7 +32,7 @@ pact_export:tools/export_model.py -c configs/faster_rcnn/faster_rcnn_r34_fpn_1x_
fpgm_export:tools/export_model.py -c configs/faster_rcnn/faster_rcnn_r34_fpn_1x_coco.yml --slim_config _template_fpgm -o
distill_export:null
export1:null
export2:null
export_onnx:null
kl_quant_export:tools/post_quant.py -c configs/faster_rcnn/faster_rcnn_r34_fpn_1x_coco.yml --slim_config _template_kl_quant -o
##
infer_mode:norm
......
......@@ -32,7 +32,7 @@ pact_export:tools/export_model.py -c configs/faster_rcnn/faster_rcnn_r34_vd_fpn_
fpgm_export:tools/export_model.py -c configs/faster_rcnn/faster_rcnn_r34_vd_fpn_1x_coco.yml --slim_config _template_fpgm -o
distill_export:null
export1:null
export2:null
export_onnx:null
kl_quant_export:tools/post_quant.py -c configs/faster_rcnn/faster_rcnn_r34_vd_fpn_1x_coco.yml --slim_config _template_kl_quant -o
##
infer_mode:norm
......
......@@ -32,7 +32,7 @@ pact_export:tools/export_model.py -c configs/faster_rcnn/faster_rcnn_r50_1x_coco
fpgm_export:tools/export_model.py -c configs/faster_rcnn/faster_rcnn_r50_1x_coco.yml --slim_config _template_fpgm -o
distill_export:null
export1:null
export2:null
export_onnx:null
kl_quant_export:tools/post_quant.py -c configs/faster_rcnn/faster_rcnn_r50_1x_coco.yml --slim_config _template_kl_quant -o
##
infer_mode:norm
......
......@@ -32,7 +32,7 @@ pact_export:tools/export_model.py -c configs/faster_rcnn/faster_rcnn_r50_fpn_1x_
fpgm_export:tools/export_model.py -c configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.yml --slim_config _template_fpgm -o
distill_export:null
export1:null
export2:null
export_onnx:null
kl_quant_export:tools/post_quant.py -c configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.yml --slim_config _template_kl_quant -o
##
infer_mode:norm
......
......@@ -32,7 +32,7 @@ pact_export:tools/export_model.py -c configs/faster_rcnn/faster_rcnn_r50_vd_1x_c
fpgm_export:tools/export_model.py -c configs/faster_rcnn/faster_rcnn_r50_vd_1x_coco.yml --slim_config _template_fpgm -o
distill_export:null
export1:null
export2:null
export_onnx:null
kl_quant_export:tools/post_quant.py -c configs/faster_rcnn/faster_rcnn_r50_vd_1x_coco.yml --slim_config _template_kl_quant -o
##
infer_mode:norm
......
......@@ -32,7 +32,7 @@ pact_export:tools/export_model.py -c configs/faster_rcnn/faster_rcnn_r50_vd_fpn_
fpgm_export:tools/export_model.py -c configs/faster_rcnn/faster_rcnn_r50_vd_fpn_1x_coco.yml --slim_config _template_fpgm -o
distill_export:null
export1:null
export2:null
export_onnx:null
kl_quant_export:tools/post_quant.py -c configs/faster_rcnn/faster_rcnn_r50_vd_fpn_1x_coco.yml --slim_config _template_kl_quant -o
##
infer_mode:norm
......
......@@ -32,7 +32,7 @@ pact_export:tools/export_model.py -c configs/faster_rcnn/faster_rcnn_swin_tiny_f
fpgm_export:tools/export_model.py -c configs/faster_rcnn/faster_rcnn_swin_tiny_fpn_1x_coco.yml --slim_config _template_fpgm -o
distill_export:null
export1:null
export2:null
export_onnx:null
kl_quant_export:tools/post_quant.py -c configs/faster_rcnn/faster_rcnn_swin_tiny_fpn_1x_coco.yml --slim_config _template_kl_quant -o
##
infer_mode:norm
......
......@@ -32,7 +32,7 @@ pact_export:tools/export_model.py -c configs/faster_rcnn/faster_rcnn_x101_vd_64x
fpgm_export:tools/export_model.py -c configs/faster_rcnn/faster_rcnn_x101_vd_64x4d_fpn_1x_coco.yml --slim_config _template_fpgm -o
distill_export:null
export1:null
export2:null
export_onnx:null
kl_quant_export:tools/post_quant.py -c configs/faster_rcnn/faster_rcnn_x101_vd_64x4d_fpn_1x_coco.yml --slim_config _template_kl_quant -o
##
infer_mode:norm
......
......@@ -32,7 +32,7 @@ pact_export:tools/export_model.py -c configs/mask_rcnn/mask_rcnn_r101_fpn_1x_coc
fpgm_export:tools/export_model.py -c configs/mask_rcnn/mask_rcnn_r101_fpn_1x_coco.yml --slim_config _template_fpgm -o
distill_export:null
export1:null
export2:null
export_onnx:null
kl_quant_export:tools/post_quant.py -c configs/mask_rcnn/mask_rcnn_r101_fpn_1x_coco.yml --slim_config _template_kl_quant -o
##
infer_mode:norm
......
......@@ -32,7 +32,7 @@ pact_export:tools/export_model.py -c configs/mask_rcnn/mask_rcnn_r101_vd_fpn_1x_
fpgm_export:tools/export_model.py -c configs/mask_rcnn/mask_rcnn_r101_vd_fpn_1x_coco.yml --slim_config _template_fpgm -o
distill_export:null
export1:null
export2:null
export_onnx:null
kl_quant_export:tools/post_quant.py -c configs/mask_rcnn/mask_rcnn_r101_vd_fpn_1x_coco.yml --slim_config _template_kl_quant -o
##
infer_mode:norm
......
......@@ -32,7 +32,7 @@ pact_export:tools/export_model.py -c configs/mask_rcnn/mask_rcnn_r50_1x_coco.yml
fpgm_export:tools/export_model.py -c configs/mask_rcnn/mask_rcnn_r50_1x_coco.yml --slim_config _template_fpgm -o
distill_export:null
export1:null
export2:null
export_onnx:null
kl_quant_export:tools/post_quant.py -c configs/mask_rcnn/mask_rcnn_r50_1x_coco.yml --slim_config _template_kl_quant -o
##
infer_mode:norm
......
......@@ -32,7 +32,7 @@ pact_export:tools/export_model.py -c configs/mask_rcnn/mask_rcnn_r50_fpn_1x_coco
fpgm_export:tools/export_model.py -c configs/mask_rcnn/mask_rcnn_r50_fpn_1x_coco.yml --slim_config _template_fpgm -o
distill_export:null
export1:null
export2:null
export_onnx:null
kl_quant_export:tools/post_quant.py -c configs/mask_rcnn/mask_rcnn_r50_fpn_1x_coco.yml --slim_config _template_kl_quant -o
##
infer_mode:norm
......
......@@ -32,7 +32,7 @@ pact_export:tools/export_model.py -c configs/mask_rcnn/mask_rcnn_r50_vd_fpn_1x_c
fpgm_export:tools/export_model.py -c configs/mask_rcnn/mask_rcnn_r50_vd_fpn_1x_coco.yml --slim_config _template_fpgm -o
distill_export:null
export1:null
export2:null
export_onnx:null
kl_quant_export:tools/post_quant.py -c configs/mask_rcnn/mask_rcnn_r50_vd_fpn_1x_coco.yml --slim_config _template_kl_quant -o
##
infer_mode:norm
......
......@@ -32,7 +32,7 @@ pact_export:tools/export_model.py -c configs/mask_rcnn/mask_rcnn_x101_vd_64x4d_f
fpgm_export:tools/export_model.py -c configs/mask_rcnn/mask_rcnn_x101_vd_64x4d_fpn_1x_coco.yml --slim_config _template_fpgm -o
distill_export:null
export1:null
export2:null
export_onnx:null
kl_quant_export:tools/post_quant.py -c configs/mask_rcnn/mask_rcnn_x101_vd_64x4d_fpn_1x_coco.yml --slim_config _template_kl_quant -o
##
infer_mode:norm
......
......@@ -62,7 +62,7 @@ fpgm_export=$(func_parser_value "${lines[31]}")
distill_export=$(func_parser_value "${lines[32]}")
export_key1=$(func_parser_key "${lines[33]}")
export_value1=$(func_parser_value "${lines[33]}")
export_key2=$(func_parser_key "${lines[34]}")
export_onnx_key=$(func_parser_key "${lines[34]}")
export_value2=$(func_parser_value "${lines[34]}")
kl_quant_export=$(func_parser_value "${lines[35]}")
......@@ -297,15 +297,27 @@ else
fi
# run export model
if [ ${run_export} != "null" ]; then
# run export model
save_export_model_dir="${save_log}/${model_name}"
set_export_weight=$(func_set_params "${export_weight_key}" "${save_log}/${model_name}/${train_model_name}")
set_save_export_dir=$(func_set_params "${save_export_key}" "${save_log}")
if [ ${export_onnx_key} = "export_onnx" ]; then
# run export onnx model for rcnn
export_cmd="${python} ${run_export} ${set_export_weight} ${set_filename} export_onnx=True ${set_save_export_dir} "
eval $export_cmd
status_check $? "${export_cmd}" "${status_log}"
# copy model for inference benchmark
eval "cp ${save_export_model_dir}/* ${save_log}/"
fi
# run export model
export_cmd="${python} ${run_export} ${set_export_weight} ${set_filename} ${set_save_export_dir} "
eval $export_cmd
status_check $? "${export_cmd}" "${status_log}"
#run inference
save_export_model_dir="${save_log}/${model_name}"
if [ ${export_onnx_key} != "export_onnx" ]; then
# copy model for inference benchmark
eval "cp ${save_export_model_dir}/* ${save_log}/"
fi
eval $env
func_inference "${python}" "${inference_py}" "${save_export_model_dir}" "${LOG_PATH}" "${train_infer_img_dir}" "${flag_quant}"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册