提交 4f79d00c 编写于 作者: H HydrogenSulfate

rename config -> configs

上级 10cf8736
......@@ -38,8 +38,8 @@ infer_model:../inference/
infer_export:True
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.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
......
......@@ -38,10 +38,10 @@ infer_model:../inference/
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.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1|6
-o Global.batch_size:1|16
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
......
......@@ -38,10 +38,10 @@ infer_model:../inference/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:False
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1|6
-o Global.batch_size:1|16
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
......
......@@ -38,10 +38,10 @@ infer_model:../inference/
infer_export:True
infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml
-o Global.use_gpu:False
-o Global.use_gpu:True|False
-o Global.enable_mkldnn:False
-o Global.cpu_num_threads:1|6
-o Global.batch_size:1|16
-o Global.cpu_num_threads:1
-o Global.batch_size:1
-o Global.use_tensorrt:False
-o Global.use_fp16:False
-o Global.inference_model_dir:../inference
......
......@@ -9,7 +9,7 @@
```shell
# 运行格式:bash test_tipc/prepare.sh train_benchmark.txt mode
bash test_tipc/prepare.sh test_tipc/config/MobileNetV2/MobileNetV2_train_infer_python.txt benchmark_train
bash test_tipc/prepare.sh test_tipc/configs/MobileNetV2/MobileNetV2_train_infer_python.txt benchmark_train
```
## 1.2 功能测试
......@@ -17,14 +17,14 @@ bash test_tipc/prepare.sh test_tipc/config/MobileNetV2/MobileNetV2_train_infer_p
```shell
# 运行格式:bash test_tipc/benchmark_train.sh train_benchmark.txt mode
bash test_tipc/benchmark_train.sh test_tipc/config/MobileNetV2/MobileNetV2_train_infer_python.txt benchmark_train
bash test_tipc/benchmark_train.sh test_tipc/configs/MobileNetV2/MobileNetV2_train_infer_python.txt benchmark_train
```
`test_tipc/benchmark_train.sh`支持根据传入的第三个参数实现只运行某一个训练配置,如下:
```shell
# 运行格式:bash test_tipc/benchmark_train.sh train_benchmark.txt mode params
bash test_tipc/benchmark_train.sh test_tipc/config/MobileNetV2/MobileNetV2_train_infer_python.txt benchmark_train dynamic_bs8_fp32_DP_N1C1
bash test_tipc/benchmark_train.sh test_tipc/configs/MobileNetV2/MobileNetV2_train_infer_python.txt benchmark_train dynamic_bs8_fp32_DP_N1C1
```
dynamic_bs8_fp32_DP_N1C1为test_tipc/benchmark_train.sh传入的参数,格式如下:
`${modeltype}_${batch_size}_${fp_item}_${run_mode}_${device_num}`
......@@ -33,7 +33,7 @@ dynamic_bs8_fp32_DP_N1C1为test_tipc/benchmark_train.sh传入的参数,格式
## 2. 日志输出
运行后将保存模型的训练日志和解析日志,使用 `test_tipc/config/MobileNetV2/MobileNetV2_train_infer_python.txt` 参数文件的训练日志解析结果是:
运行后将保存模型的训练日志和解析日志,使用 `test_tipc/configs/MobileNetV2/MobileNetV2_train_infer_python.txt` 参数文件的训练日志解析结果是:
```
{"model_branch": "dygaph", "model_commit": "7c39a1996b19087737c05d883fd346d2f39dbcc0", "model_name": "cls_MobileNetV2_bs8_fp32_SingleP_DP", "batch_size": 8, "fp_item": "fp32", "run_process_type": "SingleP", "run_mode": "DP", "convergence_value": "5.413110", "convergence_key": "loss:", "ips": 19.333, "speed_unit": "samples/s", "device_num": "N1C1", "model_run_time": "0", "frame_commit": "8cc09552473b842c651ead3b9848d41827a3dbab", "frame_version": "0.0.0"}
......
......@@ -246,7 +246,7 @@ make -j
* 可执行以下命令,自动完成上述准备环境中的所需内容
```shell
bash test_tipc/prepare.sh test_tipc/config/ResNet/ResNet50_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt cpp_infer
bash test_tipc/prepare.sh test_tipc/configs/ResNet/ResNet50_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt cpp_infer
```
### 2.3 功能测试
......@@ -260,7 +260,7 @@ bash test_tipc/test_inference_cpp.sh ${your_params_file} cpp_infer
`ResNet50``Linux GPU/CPU C++推理测试`为例,命令如下所示。
```shell
bash test_tipc/test_inference_cpp.sh test_tipc/config/ResNet/ResNet50_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt cpp_infer
bash test_tipc/test_inference_cpp.sh test_tipc/configs/ResNet/ResNet50_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt cpp_infer
```
输出结果如下,表示命令运行成功。
......
......@@ -15,7 +15,7 @@ Lite_arm_cpp_cpu 预测功能测试的主程序为`test_lite_arm_cpu_cpp.sh`,
先运行 `prepare_lite_arm_cpu_cpp.sh` 准备数据和模型,然后运行 `test_lite_arm_cpu_cpp.sh` 进行测试,最终在 `./output` 目录下生成 `lite_*.log` 后缀的日志文件。
```shell
bash test_tipc/prepare_lite_arm_cpu_cpp.sh test_tipc/config/MobileNetV3/MobileNetV3_large_x1_0_lite_arm_cpu_cpp.txt
bash test_tipc/prepare_lite_arm_cpu_cpp.sh test_tipc/configs/MobileNetV3/MobileNetV3_large_x1_0_lite_arm_cpu_cpp.txt
```
运行预测指令后,在`./output`文件夹下自动会保存运行日志,包括以下文件:
......
......@@ -21,10 +21,10 @@ PaddleServing预测功能测试的主程序为`test_paddle2onnx.sh`,可以测
下方展示以PPHGNet_small为例的测试命令与结果。
```shell
bash test_tipc/prepare.sh ./test_tipc/config/ResNet/ResNet50_linux_gpu_normal_normal_paddle2onnx_python_linux_cpu.txt paddle2onnx_infer
bash test_tipc/prepare.sh ./test_tipc/configs/ResNet/ResNet50_linux_gpu_normal_normal_paddle2onnx_python_linux_cpu.txt paddle2onnx_infer
# 用法:
bash test_tipc/test_paddle2onnx.sh ./test_tipc/config/ResNet/ResNet50_linux_gpu_normal_normal_paddle2onnx_python_linux_cpu.txt
bash test_tipc/test_paddle2onnx.sh ./test_tipc/configs/ResNet/ResNet50_linux_gpu_normal_normal_paddle2onnx_python_linux_cpu.txt
```
#### 运行结果
......
......@@ -34,7 +34,7 @@ Linux GPU/CPU 多机多卡训练推理测试的主程序为`test_train_inference
#### 2.1.1 修改配置文件
首先,修改配置文件`test_tipc/config/PPLCNet/PPLCNet_x1_0_train_linux_gpu_fleet_normal_infer_python_linux_gpu_cpu.txt`中的`gpu_list`设置:假设两台机器的`ip`地址分别为`192.168.0.1``192.168.0.2`,则对应的配置文件`gpu_list`字段需要修改为`gpu_list:192.168.0.1,192.168.0.2;0,1`
首先,修改配置文件`test_tipc/configs/PPLCNet/PPLCNet_x1_0_train_linux_gpu_fleet_normal_infer_python_linux_gpu_cpu.txt`中的`gpu_list`设置:假设两台机器的`ip`地址分别为`192.168.0.1``192.168.0.2`,则对应的配置文件`gpu_list`字段需要修改为`gpu_list:192.168.0.1,192.168.0.2;0,1`
**`ip`地址查看命令为`ifconfig`,在`inet addr:`字段后的即为ip地址**
......@@ -44,7 +44,7 @@ Linux GPU/CPU 多机多卡训练推理测试的主程序为`test_train_inference
运行`prepare.sh`准备数据和模型,数据准备命令如下所示。
```shell
bash test_tipc/prepare.sh test_tipc/config/PPLCNet/PPLCNet_x1_0_train_linux_gpu_fleet_normal_infer_python_linux_gpu_cpu.txt lite_train_lite_infer
bash test_tipc/prepare.sh test_tipc/configs/PPLCNet/PPLCNet_x1_0_train_linux_gpu_fleet_normal_infer_python_linux_gpu_cpu.txt lite_train_lite_infer
```
**注意:** 由于是多机训练,这里需要在所有节点上都运行一次启动上述命令来准备数据。
......@@ -60,7 +60,7 @@ export FLAGS_START_PORT=17000
接下来就可以开始执行测试,命令如下所示。
```shell
bash test_tipc/test_train_inference_python.sh test_tipc/config/PPLCNet/PPLCNet_x1_0_train_linux_gpu_fleet_normal_infer_python_linux_gpu_cpu.txt
bash test_tipc/test_train_inference_python.sh test_tipc/configs/PPLCNet/PPLCNet_x1_0_train_linux_gpu_fleet_normal_infer_python_linux_gpu_cpu.txt
```
**注意:** 由于是多机训练,这里需要在所有的节点上均运行启动上述命令进行测试。
......
......@@ -58,36 +58,36 @@ Linux端基础训练预测功能测试的主程序为`test_train_inference_pytho
- 模式1:lite_train_lite_infer,使用少量数据训练,用于快速验证训练到预测的走通流程,不验证精度和速度;
```shell
bash test_tipc/prepare.sh ./test_tipc/config/ResNet/ResNet50_vd_train_infer_python.txt 'lite_train_lite_infer'
bash test_tipc/test_train_inference_python.sh ./test_tipc/config/ResNet/ResNet50_vd_train_infer_python.txt 'lite_train_lite_infer'
bash test_tipc/prepare.sh ./test_tipc/configs/ResNet/ResNet50_vd_train_infer_python.txt 'lite_train_lite_infer'
bash test_tipc/test_train_inference_python.sh ./test_tipc/configs/ResNet/ResNet50_vd_train_infer_python.txt 'lite_train_lite_infer'
```
- 模式2:lite_train_whole_infer,使用少量数据训练,一定量数据预测,用于验证训练后的模型执行预测,预测速度是否合理;
```shell
bash test_tipc/prepare.sh ./test_tipc/config/ResNet/ResNet50_vd_train_infer_python.txt 'lite_train_whole_infer'
bash test_tipc/test_train_inference_python.sh ./test_tipc/config/ResNet/ResNet50_vd_train_infer_python.txt 'lite_train_whole_infer'
bash test_tipc/prepare.sh ./test_tipc/configs/ResNet/ResNet50_vd_train_infer_python.txt 'lite_train_whole_infer'
bash test_tipc/test_train_inference_python.sh ./test_tipc/configs/ResNet/ResNet50_vd_train_infer_python.txt 'lite_train_whole_infer'
```
- 模式3:whole_infer,不训练,全量数据预测,走通开源模型评估、动转静,检查inference model预测时间和精度;
```shell
bash test_tipc/prepare.sh ./test_tipc/config/ResNet/ResNet50_vd_train_infer_python.txt 'whole_infer'
bash test_tipc/prepare.sh ./test_tipc/configs/ResNet/ResNet50_vd_train_infer_python.txt 'whole_infer'
# 用法1:
bash test_tipc/test_train_inference_python.sh ./test_tipc/config/ResNet/ResNet50_vd_train_infer_python.txt 'whole_infer'
bash test_tipc/test_train_inference_python.sh ./test_tipc/configs/ResNet/ResNet50_vd_train_infer_python.txt 'whole_infer'
# 用法2: 指定GPU卡预测,第三个传入参数为GPU卡号
bash test_tipc/test_train_inference_python.sh ./test_tipc/config/ResNet/ResNet50_vd_train_infer_python.txt 'whole_infer' '1'
bash test_tipc/test_train_inference_python.sh ./test_tipc/configs/ResNet/ResNet50_vd_train_infer_python.txt 'whole_infer' '1'
```
- 模式4:whole_train_whole_infer,CE: 全量数据训练,全量数据预测,验证模型训练精度,预测精度,预测速度;
```shell
bash test_tipc/prepare.sh ./test_tipc/config/ResNet/ResNet50_vd_train_infer_python.txt 'whole_train_whole_infer'
bash test_tipc/test_train_inference_python.sh ./test_tipc/config/ResNet/ResNet50_vd_train_infer_python.txt 'whole_train_whole_infer'
bash test_tipc/prepare.sh ./test_tipc/configs/ResNet/ResNet50_vd_train_infer_python.txt 'whole_train_whole_infer'
bash test_tipc/test_train_inference_python.sh ./test_tipc/configs/ResNet/ResNet50_vd_train_infer_python.txt 'whole_train_whole_infer'
```
- 模式5: klquant_whole_infer,测试离线量化;
```shell
bash test_tipc/prepare.sh ./test_tipc/config/ResNet/ResNet50_vd_train_infer_python.txt 'klquant_whole_infer'
bash test_tipc/test_train_inference_python.sh ./test_tipc/config/ResNet/ResNet50_vd_train_infer_python.txt 'klquant_whole_infer'
bash test_tipc/prepare.sh ./test_tipc/configs/ResNet/ResNet50_vd_train_infer_python.txt 'klquant_whole_infer'
bash test_tipc/test_train_inference_python.sh ./test_tipc/configs/ResNet/ResNet50_vd_train_infer_python.txt 'klquant_whole_infer'
```
......
......@@ -79,7 +79,7 @@ Linux GPU/CPU PACT量化训练推理测试的主程序为`test_train_inference_p
### 2.2 准备数据和模型
```bash
bash test_tipc/prepare.sh test_tipc/config/PPLCNetV2/PPLCNetV2_base_train_pact_infer_python.txt lite_train_lite_infer
bash test_tipc/prepare.sh test_tipc/configs/PPLCNetV2/PPLCNetV2_base_train_pact_infer_python.txt lite_train_lite_infer
```
在线量化的操作流程,可参考[文档](../../deploy/slim/README.md)
......@@ -89,7 +89,7 @@ bash test_tipc/prepare.sh test_tipc/config/PPLCNetV2/PPLCNetV2_base_train_pact_i
`MobileNetV3_large_x1_0``Linux GPU/CPU PACT在线量化训练推理测试`为例,命令如下所示。
```bash
bash test_tipc/test_train_inference_python.sh test_tipc/config/PPLCNetV2/PPLCNetV2_base_train_pact_infer_python.txt lite_train_lite_infer
bash test_tipc/test_train_inference_python.sh test_tipc/configs/PPLCNetV2/PPLCNetV2_base_train_pact_infer_python.txt lite_train_lite_infer
```
输出结果如下,表示命令运行成功。
......
......@@ -80,7 +80,7 @@ Linux GPU/CPU KL离线量化推理测试的主程序为`test_ptq_inference_pytho
### 2.2 准备数据和模型
```bash
bash test_tipc/prepare.sh test_tipc/config/MobileNetV3/MobileNetV3_large_x1_0_train_ptq_infer_python.txt whole_infer
bash test_tipc/prepare.sh test_tipc/configs/MobileNetV3/MobileNetV3_large_x1_0_train_ptq_infer_python.txt whole_infer
```
离线量化的操作流程,可参考[文档](../../deploy/slim/README.md)
......@@ -90,7 +90,7 @@ bash test_tipc/prepare.sh test_tipc/config/MobileNetV3/MobileNetV3_large_x1_0_tr
`MobileNetV3_large_x1_0``Linux GPU/CPU KL离线量化训练推理测试`为例,命令如下所示。
```bash
bash test_tipc/test_ptq_inference_python.sh test_tipc/config/MobileNetV3/MobileNetV3_large_x1_0_train_ptq_infer_python.txt whole_infer
bash test_tipc/test_ptq_inference_python.sh test_tipc/configs/MobileNetV3/MobileNetV3_large_x1_0_train_ptq_infer_python.txt whole_infer
```
输出结果如下,表示命令运行成功。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册