From 063afe0233d88954d5e0b0540862f89d42c1ea81 Mon Sep 17 00:00:00 2001 From: shangliang Xu Date: Wed, 13 Apr 2022 16:03:06 +0800 Subject: [PATCH] [TIPC] fix path and rcnn onnx (#5672) * add copy model line * update export_onnx_key, test=document_fix --- ...rcnn_r50_fpn_1x_coco_train_infer_python.txt | 2 +- ..._vd_fpn_ssld_1x_coco_train_infer_python.txt | 2 +- ...rcnn_r50_fpn_1x_coco_train_infer_python.txt | 2 +- ..._vd_fpn_ssld_1x_coco_train_infer_python.txt | 2 +- ...er_rcnn_r101_1x_coco_train_infer_python.txt | 2 +- ...cnn_r101_fpn_1x_coco_train_infer_python.txt | 2 +- ..._r101_vd_fpn_1x_coco_train_infer_python.txt | 2 +- ...rcnn_r34_fpn_1x_coco_train_infer_python.txt | 2 +- ...n_r34_vd_fpn_1x_coco_train_infer_python.txt | 2 +- ...ter_rcnn_r50_1x_coco_train_infer_python.txt | 2 +- ...rcnn_r50_fpn_1x_coco_train_infer_python.txt | 2 +- ..._rcnn_r50_vd_1x_coco_train_infer_python.txt | 2 +- ...n_r50_vd_fpn_1x_coco_train_infer_python.txt | 2 +- ...win_tiny_fpn_1x_coco_train_infer_python.txt | 2 +- ...vd_64x4d_fpn_1x_coco_train_infer_python.txt | 2 +- ...cnn_r101_fpn_1x_coco_train_infer_python.txt | 2 +- ..._r101_vd_fpn_1x_coco_train_infer_python.txt | 2 +- ...ask_rcnn_r50_1x_coco_train_infer_python.txt | 2 +- ...rcnn_r50_fpn_1x_coco_train_infer_python.txt | 2 +- ...n_r50_vd_fpn_1x_coco_train_infer_python.txt | 2 +- ...vd_64x4d_fpn_1x_coco_train_infer_python.txt | 2 +- test_tipc/test_train_inference_python.sh | 18 +++++++++++++++--- 22 files changed, 36 insertions(+), 24 deletions(-) diff --git a/test_tipc/configs/cascade_rcnn/cascade_mask_rcnn_r50_fpn_1x_coco_train_infer_python.txt b/test_tipc/configs/cascade_rcnn/cascade_mask_rcnn_r50_fpn_1x_coco_train_infer_python.txt index a8eebb055..15060e503 100644 --- a/test_tipc/configs/cascade_rcnn/cascade_mask_rcnn_r50_fpn_1x_coco_train_infer_python.txt +++ b/test_tipc/configs/cascade_rcnn/cascade_mask_rcnn_r50_fpn_1x_coco_train_infer_python.txt @@ -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 diff --git a/test_tipc/configs/cascade_rcnn/cascade_mask_rcnn_r50_vd_fpn_ssld_1x_coco_train_infer_python.txt b/test_tipc/configs/cascade_rcnn/cascade_mask_rcnn_r50_vd_fpn_ssld_1x_coco_train_infer_python.txt index 6a5396dcf..acd89de7b 100644 --- a/test_tipc/configs/cascade_rcnn/cascade_mask_rcnn_r50_vd_fpn_ssld_1x_coco_train_infer_python.txt +++ b/test_tipc/configs/cascade_rcnn/cascade_mask_rcnn_r50_vd_fpn_ssld_1x_coco_train_infer_python.txt @@ -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 diff --git a/test_tipc/configs/cascade_rcnn/cascade_rcnn_r50_fpn_1x_coco_train_infer_python.txt b/test_tipc/configs/cascade_rcnn/cascade_rcnn_r50_fpn_1x_coco_train_infer_python.txt index c84223cee..c92e7053a 100644 --- a/test_tipc/configs/cascade_rcnn/cascade_rcnn_r50_fpn_1x_coco_train_infer_python.txt +++ b/test_tipc/configs/cascade_rcnn/cascade_rcnn_r50_fpn_1x_coco_train_infer_python.txt @@ -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 diff --git a/test_tipc/configs/cascade_rcnn/cascade_rcnn_r50_vd_fpn_ssld_1x_coco_train_infer_python.txt b/test_tipc/configs/cascade_rcnn/cascade_rcnn_r50_vd_fpn_ssld_1x_coco_train_infer_python.txt index 9af29c5fe..1bd0eed60 100644 --- a/test_tipc/configs/cascade_rcnn/cascade_rcnn_r50_vd_fpn_ssld_1x_coco_train_infer_python.txt +++ b/test_tipc/configs/cascade_rcnn/cascade_rcnn_r50_vd_fpn_ssld_1x_coco_train_infer_python.txt @@ -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 diff --git a/test_tipc/configs/faster_rcnn/faster_rcnn_r101_1x_coco_train_infer_python.txt b/test_tipc/configs/faster_rcnn/faster_rcnn_r101_1x_coco_train_infer_python.txt index bb35fbd04..c9434b9cd 100644 --- a/test_tipc/configs/faster_rcnn/faster_rcnn_r101_1x_coco_train_infer_python.txt +++ b/test_tipc/configs/faster_rcnn/faster_rcnn_r101_1x_coco_train_infer_python.txt @@ -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 diff --git a/test_tipc/configs/faster_rcnn/faster_rcnn_r101_fpn_1x_coco_train_infer_python.txt b/test_tipc/configs/faster_rcnn/faster_rcnn_r101_fpn_1x_coco_train_infer_python.txt index 2663ed682..da3523a1f 100644 --- a/test_tipc/configs/faster_rcnn/faster_rcnn_r101_fpn_1x_coco_train_infer_python.txt +++ b/test_tipc/configs/faster_rcnn/faster_rcnn_r101_fpn_1x_coco_train_infer_python.txt @@ -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 diff --git a/test_tipc/configs/faster_rcnn/faster_rcnn_r101_vd_fpn_1x_coco_train_infer_python.txt b/test_tipc/configs/faster_rcnn/faster_rcnn_r101_vd_fpn_1x_coco_train_infer_python.txt index 7e03d9ed4..35a4bfd7d 100644 --- a/test_tipc/configs/faster_rcnn/faster_rcnn_r101_vd_fpn_1x_coco_train_infer_python.txt +++ b/test_tipc/configs/faster_rcnn/faster_rcnn_r101_vd_fpn_1x_coco_train_infer_python.txt @@ -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 diff --git a/test_tipc/configs/faster_rcnn/faster_rcnn_r34_fpn_1x_coco_train_infer_python.txt b/test_tipc/configs/faster_rcnn/faster_rcnn_r34_fpn_1x_coco_train_infer_python.txt index 15eb02248..49587c5bc 100644 --- a/test_tipc/configs/faster_rcnn/faster_rcnn_r34_fpn_1x_coco_train_infer_python.txt +++ b/test_tipc/configs/faster_rcnn/faster_rcnn_r34_fpn_1x_coco_train_infer_python.txt @@ -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 diff --git a/test_tipc/configs/faster_rcnn/faster_rcnn_r34_vd_fpn_1x_coco_train_infer_python.txt b/test_tipc/configs/faster_rcnn/faster_rcnn_r34_vd_fpn_1x_coco_train_infer_python.txt index e63e6ebd7..cc9c72a76 100644 --- a/test_tipc/configs/faster_rcnn/faster_rcnn_r34_vd_fpn_1x_coco_train_infer_python.txt +++ b/test_tipc/configs/faster_rcnn/faster_rcnn_r34_vd_fpn_1x_coco_train_infer_python.txt @@ -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 diff --git a/test_tipc/configs/faster_rcnn/faster_rcnn_r50_1x_coco_train_infer_python.txt b/test_tipc/configs/faster_rcnn/faster_rcnn_r50_1x_coco_train_infer_python.txt index b9938cbe6..a2f701da4 100644 --- a/test_tipc/configs/faster_rcnn/faster_rcnn_r50_1x_coco_train_infer_python.txt +++ b/test_tipc/configs/faster_rcnn/faster_rcnn_r50_1x_coco_train_infer_python.txt @@ -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 diff --git a/test_tipc/configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco_train_infer_python.txt b/test_tipc/configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco_train_infer_python.txt index d4ca96fab..bb1765338 100644 --- a/test_tipc/configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco_train_infer_python.txt +++ b/test_tipc/configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco_train_infer_python.txt @@ -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 diff --git a/test_tipc/configs/faster_rcnn/faster_rcnn_r50_vd_1x_coco_train_infer_python.txt b/test_tipc/configs/faster_rcnn/faster_rcnn_r50_vd_1x_coco_train_infer_python.txt index 024208b33..758a94cda 100644 --- a/test_tipc/configs/faster_rcnn/faster_rcnn_r50_vd_1x_coco_train_infer_python.txt +++ b/test_tipc/configs/faster_rcnn/faster_rcnn_r50_vd_1x_coco_train_infer_python.txt @@ -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 diff --git a/test_tipc/configs/faster_rcnn/faster_rcnn_r50_vd_fpn_1x_coco_train_infer_python.txt b/test_tipc/configs/faster_rcnn/faster_rcnn_r50_vd_fpn_1x_coco_train_infer_python.txt index 3b2522fcb..de865f501 100644 --- a/test_tipc/configs/faster_rcnn/faster_rcnn_r50_vd_fpn_1x_coco_train_infer_python.txt +++ b/test_tipc/configs/faster_rcnn/faster_rcnn_r50_vd_fpn_1x_coco_train_infer_python.txt @@ -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 diff --git a/test_tipc/configs/faster_rcnn/faster_rcnn_swin_tiny_fpn_1x_coco_train_infer_python.txt b/test_tipc/configs/faster_rcnn/faster_rcnn_swin_tiny_fpn_1x_coco_train_infer_python.txt index 9c59a78b5..207c95b35 100644 --- a/test_tipc/configs/faster_rcnn/faster_rcnn_swin_tiny_fpn_1x_coco_train_infer_python.txt +++ b/test_tipc/configs/faster_rcnn/faster_rcnn_swin_tiny_fpn_1x_coco_train_infer_python.txt @@ -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 diff --git a/test_tipc/configs/faster_rcnn/faster_rcnn_x101_vd_64x4d_fpn_1x_coco_train_infer_python.txt b/test_tipc/configs/faster_rcnn/faster_rcnn_x101_vd_64x4d_fpn_1x_coco_train_infer_python.txt index a47c34c5f..297cbfe09 100644 --- a/test_tipc/configs/faster_rcnn/faster_rcnn_x101_vd_64x4d_fpn_1x_coco_train_infer_python.txt +++ b/test_tipc/configs/faster_rcnn/faster_rcnn_x101_vd_64x4d_fpn_1x_coco_train_infer_python.txt @@ -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 diff --git a/test_tipc/configs/mask_rcnn/mask_rcnn_r101_fpn_1x_coco_train_infer_python.txt b/test_tipc/configs/mask_rcnn/mask_rcnn_r101_fpn_1x_coco_train_infer_python.txt index eea535fdb..da4b45aea 100644 --- a/test_tipc/configs/mask_rcnn/mask_rcnn_r101_fpn_1x_coco_train_infer_python.txt +++ b/test_tipc/configs/mask_rcnn/mask_rcnn_r101_fpn_1x_coco_train_infer_python.txt @@ -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 diff --git a/test_tipc/configs/mask_rcnn/mask_rcnn_r101_vd_fpn_1x_coco_train_infer_python.txt b/test_tipc/configs/mask_rcnn/mask_rcnn_r101_vd_fpn_1x_coco_train_infer_python.txt index 96812063c..6e658ce97 100644 --- a/test_tipc/configs/mask_rcnn/mask_rcnn_r101_vd_fpn_1x_coco_train_infer_python.txt +++ b/test_tipc/configs/mask_rcnn/mask_rcnn_r101_vd_fpn_1x_coco_train_infer_python.txt @@ -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 diff --git a/test_tipc/configs/mask_rcnn/mask_rcnn_r50_1x_coco_train_infer_python.txt b/test_tipc/configs/mask_rcnn/mask_rcnn_r50_1x_coco_train_infer_python.txt index d25631526..d3d91a9de 100644 --- a/test_tipc/configs/mask_rcnn/mask_rcnn_r50_1x_coco_train_infer_python.txt +++ b/test_tipc/configs/mask_rcnn/mask_rcnn_r50_1x_coco_train_infer_python.txt @@ -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 diff --git a/test_tipc/configs/mask_rcnn/mask_rcnn_r50_fpn_1x_coco_train_infer_python.txt b/test_tipc/configs/mask_rcnn/mask_rcnn_r50_fpn_1x_coco_train_infer_python.txt index f4d95bcdc..fe15d42c3 100644 --- a/test_tipc/configs/mask_rcnn/mask_rcnn_r50_fpn_1x_coco_train_infer_python.txt +++ b/test_tipc/configs/mask_rcnn/mask_rcnn_r50_fpn_1x_coco_train_infer_python.txt @@ -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 diff --git a/test_tipc/configs/mask_rcnn/mask_rcnn_r50_vd_fpn_1x_coco_train_infer_python.txt b/test_tipc/configs/mask_rcnn/mask_rcnn_r50_vd_fpn_1x_coco_train_infer_python.txt index fd3e542a6..f1156ff3c 100644 --- a/test_tipc/configs/mask_rcnn/mask_rcnn_r50_vd_fpn_1x_coco_train_infer_python.txt +++ b/test_tipc/configs/mask_rcnn/mask_rcnn_r50_vd_fpn_1x_coco_train_infer_python.txt @@ -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 diff --git a/test_tipc/configs/mask_rcnn/mask_rcnn_x101_vd_64x4d_fpn_1x_coco_train_infer_python.txt b/test_tipc/configs/mask_rcnn/mask_rcnn_x101_vd_64x4d_fpn_1x_coco_train_infer_python.txt index ec7e0f4a7..4ad43fabd 100644 --- a/test_tipc/configs/mask_rcnn/mask_rcnn_x101_vd_64x4d_fpn_1x_coco_train_infer_python.txt +++ b/test_tipc/configs/mask_rcnn/mask_rcnn_x101_vd_64x4d_fpn_1x_coco_train_infer_python.txt @@ -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 diff --git a/test_tipc/test_train_inference_python.sh b/test_tipc/test_train_inference_python.sh index da8cb37e0..d0eb77810 100644 --- a/test_tipc/test_train_inference_python.sh +++ b/test_tipc/test_train_inference_python.sh @@ -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}" -- GitLab