From 2e56bec7d65912c2cf3d4050761bed871bb37e67 Mon Sep 17 00:00:00 2001 From: HydrogenSulfate <490868991@qq.com> Date: Mon, 4 Jul 2022 15:01:48 +0800 Subject: [PATCH] slim fleet_train config and fix paddle2onnx for GeneralRecognition model --- ...u_fleet_normal_infer_python_linux_gpu_cpu.txt | 10 +++++----- ...u_fleet_normal_infer_python_linux_gpu_cpu.txt | 10 +++++----- ...u_fleet_normal_infer_python_linux_gpu_cpu.txt | 10 +++++----- ...u_fleet_normal_infer_python_linux_gpu_cpu.txt | 10 +++++----- test_tipc/prepare.sh | 16 ++++++++++++++++ 5 files changed, 36 insertions(+), 20 deletions(-) diff --git a/test_tipc/config/GeneralRecognition/GeneralRecognition_PPLCNet_x2_5_train_linux_gpu_fleet_normal_infer_python_linux_gpu_cpu.txt b/test_tipc/config/GeneralRecognition/GeneralRecognition_PPLCNet_x2_5_train_linux_gpu_fleet_normal_infer_python_linux_gpu_cpu.txt index 4c4e1be2..03a1f884 100644 --- a/test_tipc/config/GeneralRecognition/GeneralRecognition_PPLCNet_x2_5_train_linux_gpu_fleet_normal_infer_python_linux_gpu_cpu.txt +++ b/test_tipc/config/GeneralRecognition/GeneralRecognition_PPLCNet_x2_5_train_linux_gpu_fleet_normal_infer_python_linux_gpu_cpu.txt @@ -40,14 +40,14 @@ infer_quant:Fasle inference:python/predict_rec.py -c configs/inference_rec.yaml -o Global.use_gpu:False -o Global.enable_mkldnn:True|False --o Global.cpu_num_threads:1|6 --o Global.batch_size:1|16 --o Global.use_tensorrt:True|False --o Global.use_fp16:True|False +-o Global.cpu_num_threads:1 +-o Global.batch_size:1 +-o Global.use_tensorrt:False +-o Global.use_fp16:False -o Global.rec_inference_model_dir:../inference -o Global.infer_imgs:../dataset/Aliproduct/demo_test/ -o Global.save_log_path:null --o Global.benchmark:True +-o Global.benchmark:False null:null null:null ===========================infer_benchmark_params========================== diff --git a/test_tipc/config/PPHGNet/PPHGNet_small_train_linux_gpu_fleet_normal_infer_python_linux_gpu_cpu.txt b/test_tipc/config/PPHGNet/PPHGNet_small_train_linux_gpu_fleet_normal_infer_python_linux_gpu_cpu.txt index ba53f530..5498537d 100644 --- a/test_tipc/config/PPHGNet/PPHGNet_small_train_linux_gpu_fleet_normal_infer_python_linux_gpu_cpu.txt +++ b/test_tipc/config/PPHGNet/PPHGNet_small_train_linux_gpu_fleet_normal_infer_python_linux_gpu_cpu.txt @@ -39,15 +39,15 @@ infer_export:True infer_quant:Fasle inference:python/predict_cls.py -c configs/inference_cls.yaml -o PreProcess.transform_ops.0.ResizeImage.resize_short=236 -o Global.use_gpu:False --o Global.enable_mkldnn:True|False +-o Global.enable_mkldnn:False -o Global.cpu_num_threads:1|6 -o Global.batch_size:1|16 --o Global.use_tensorrt:True|False --o Global.use_fp16:True|False +-o Global.use_tensorrt:False +-o Global.use_fp16:False -o Global.inference_model_dir:../inference --o Global.infer_imgs:../dataset/ILSVRC2012/val +-o Global.infer_imgs:../dataset/ILSVRC2012/val/ILSVRC2012_val_00000001.JPEG -o Global.save_log_path:null --o Global.benchmark:True +-o Global.benchmark:False null:null ===========================infer_benchmark_params========================== random_infer_input:[{float32,[3,224,224]}] diff --git a/test_tipc/config/PPLCNet/PPLCNet_x1_0_train_linux_gpu_fleet_normal_infer_python_linux_gpu_cpu.txt b/test_tipc/config/PPLCNet/PPLCNet_x1_0_train_linux_gpu_fleet_normal_infer_python_linux_gpu_cpu.txt index 8ff97481..72a8c61c 100644 --- a/test_tipc/config/PPLCNet/PPLCNet_x1_0_train_linux_gpu_fleet_normal_infer_python_linux_gpu_cpu.txt +++ b/test_tipc/config/PPLCNet/PPLCNet_x1_0_train_linux_gpu_fleet_normal_infer_python_linux_gpu_cpu.txt @@ -39,15 +39,15 @@ infer_export:True infer_quant:Fasle inference:python/predict_cls.py -c configs/inference_cls.yaml -o Global.use_gpu:False --o Global.enable_mkldnn:True|False +-o Global.enable_mkldnn:False -o Global.cpu_num_threads:1|6 -o Global.batch_size:1|16 --o Global.use_tensorrt:True|False --o Global.use_fp16:True|False +-o Global.use_tensorrt:False +-o Global.use_fp16:False -o Global.inference_model_dir:../inference --o Global.infer_imgs:../dataset/ILSVRC2012/val +-o Global.infer_imgs:../dataset/ILSVRC2012/val/ILSVRC2012_val_00000001.JPEG -o Global.save_log_path:null --o Global.benchmark:True +-o Global.benchmark:False null:null ===========================infer_benchmark_params========================== random_infer_input:[{float32,[3,224,224]}] \ No newline at end of file diff --git a/test_tipc/config/PPLCNetV2/PPLCNetV2_base_train_linux_gpu_fleet_normal_infer_python_linux_gpu_cpu.txt b/test_tipc/config/PPLCNetV2/PPLCNetV2_base_train_linux_gpu_fleet_normal_infer_python_linux_gpu_cpu.txt index ee251ca6..4998ca8b 100644 --- a/test_tipc/config/PPLCNetV2/PPLCNetV2_base_train_linux_gpu_fleet_normal_infer_python_linux_gpu_cpu.txt +++ b/test_tipc/config/PPLCNetV2/PPLCNetV2_base_train_linux_gpu_fleet_normal_infer_python_linux_gpu_cpu.txt @@ -39,15 +39,15 @@ infer_export:True infer_quant:Fasle inference:python/predict_cls.py -c configs/inference_cls.yaml -o Global.use_gpu:False --o Global.enable_mkldnn:True|False +-o Global.enable_mkldnn:False -o Global.cpu_num_threads:1|6 -o Global.batch_size:1|16 --o Global.use_tensorrt:True|False --o Global.use_fp16:True|False +-o Global.use_tensorrt:False +-o Global.use_fp16:False -o Global.inference_model_dir:../inference --o Global.infer_imgs:../dataset/ILSVRC2012/val +-o Global.infer_imgs:../dataset/ILSVRC2012/val/ILSVRC2012_val_00000001.JPEG -o Global.save_log_path:null --o Global.benchmark:True +-o Global.benchmark:False null:null ===========================infer_benchmark_params========================== random_infer_input:[{float32,[3,224,224]}] diff --git a/test_tipc/prepare.sh b/test_tipc/prepare.sh index d33c93e2..1cb53ea4 100644 --- a/test_tipc/prepare.sh +++ b/test_tipc/prepare.sh @@ -311,6 +311,22 @@ if [[ ${MODE} = "paddle2onnx_infer" ]]; then ${python_name} -m pip install paddle2onnx ${python_name} -m pip install onnxruntime + if [[ ${model_name} =~ "GeneralRecognition" ]]; then + cd dataset + rm -rf Aliproduct + rm -rf train_reg_all_data.txt + rm -rf demo_train + wget -nc https://paddle-imagenet-models-name.bj.bcebos.com/data/whole_chain/tipc_shitu_demo_data.tar --no-check-certificate + tar -xf tipc_shitu_demo_data.tar + ln -s tipc_shitu_demo_data Aliproduct + ln -s tipc_shitu_demo_data/demo_train.txt train_reg_all_data.txt + ln -s tipc_shitu_demo_data/demo_train demo_train + cd tipc_shitu_demo_data + ln -s demo_test.txt val_list.txt + cd ../../ + eval "wget -nc $model_url_value --no-check-certificate" + mv general_PPLCNet_x2_5_pretrained_v1.0.pdparams GeneralRecognition_PPLCNet_x2_5_pretrained.pdparams + fi cd deploy mkdir models cd models -- GitLab