Skip to content

Commit 21d2f0c

Browse files
authored
add full chain doc (PaddlePaddle#1415)
1 parent a85444e commit 21d2f0c

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

tests/README.md

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
2+
# 从训练到推理部署工具链测试方法介绍
3+
4+
test_model.sh和params.txt文件配合使用,完成分割模型从训练到预测的流程测试。
5+
6+
# 安装依赖
7+
- 安装PaddlePaddle >= 2.1.2
8+
- 安装PaddleSeg依赖
9+
```
10+
pip3 install -r ../requirements.txt
11+
```
12+
- 安装autolog
13+
```
14+
git clone https://github.com/LDOUBLEV/AutoLog
15+
cd AutoLog
16+
pip3 install -r requirements.txt
17+
python3 setup.py bdist_wheel
18+
pip3 install ./dist/auto_log-1.0.0-py3-none-any.whl
19+
cd ../
20+
```
21+
22+
# 目录介绍
23+
24+
```bash
25+
tests/
26+
├── hrnetw18_small_v1_params.txt # 测试分割模型的参数配置文件
27+
└── fcn_hrnetw18_small_v1_humanseg_192x192_mini_supervisely.yml # 测试分割模型的config配置文件
28+
└── prepare.sh # 完成test_model.sh运行所需要的数据和模型下载
29+
└── test_model.sh # 测试主程序
30+
```
31+
32+
# 使用方法
33+
34+
test_model.sh包含四种运行模式,每种模式的运行数据不同,分别用于测试速度和精度,分别是:
35+
36+
- 模式1:lite_train_infer,使用少量数据训练,用于快速验证训练到预测的走通流程,不验证精度和速度;
37+
```shell
38+
bash test/prepare.sh ./tests/hrnetw18_small_v1_params.txt 'lite_train_infer'
39+
bash tests/test_model.sh ./tests/hrnetw18_small_v1_params.txt 'lite_train_infer'
40+
```
41+
42+
- 模式2:whole_infer,使用少量数据训练,一定量数据预测,用于验证训练后的模型执行预测,预测速度是否合理;
43+
```shell
44+
bash tests/prepare.sh ./tests/hrnetw18_small_v1_params.txt 'whole_infer'
45+
bash tests/test_model.sh ./tests/hrnetw18_small_v1_params.txt 'whole_infer'
46+
```
47+
48+
- 模式3:infer 不训练,全量数据预测,走通开源模型评估、动转静,检查inference model预测时间和精度;
49+
```shell
50+
bash tests/prepare.sh ./tests/hrnetw18_small_v1_params.txt 'infer'
51+
# 用法1:
52+
bash tests/test_model.sh ./tests/hrnetw18_small_v1_params.txt 'infer'
53+
# 用法2: 指定GPU卡预测,第三个传入参数为GPU卡号
54+
bash tests/test_model.sh ./tests/hrnetw18_small_v1_params.txt 'infer' '1'
55+
```
56+
57+
- 模式4:whole_train_infer , CE: 全量数据训练,全量数据预测,验证模型训练精度,预测精度,预测速度;
58+
```shell
59+
bash tests/prepare.sh ./tests/hrnetw18_small_v1_params.txt 'whole_train_infer'
60+
bash tests/test_model.sh ./tests/hrnetw18_small_v1_params.txt 'whole_train_infer'
61+
```
62+
63+
64+
# 日志输出
65+
最终在```tests/output```目录下生成.log后缀的日志文件

0 commit comments

Comments
 (0)