Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleOCR
提交
e7955672
P
PaddleOCR
项目概览
s920243400
/
PaddleOCR
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleOCR
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleOCR
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
e7955672
编写于
2月 08, 2022
作者:
L
LDOUBLEV
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix doc and delete run_process_type
上级
117b85ac
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
11 addition
and
14 deletion
+11
-14
test_tipc/benchmark_train.sh
test_tipc/benchmark_train.sh
+4
-4
test_tipc/docs/benchmark_train.md
test_tipc/docs/benchmark_train.md
+6
-9
tools/program.py
tools/program.py
+1
-1
未找到文件。
test_tipc/benchmark_train.sh
浏览文件 @
e7955672
...
@@ -134,16 +134,16 @@ if [ ! -n "$PARAMS" ] ;then
...
@@ -134,16 +134,16 @@ if [ ! -n "$PARAMS" ] ;then
device_num_list
=(
N1C4
)
device_num_list
=(
N1C4
)
run_mode
=
"DP"
run_mode
=
"DP"
else
else
# parser params from input: modeltype_bs${bs_item}_${fp_item}_${run_
process_type}_${run_
mode}_${device_num}
# parser params from input: modeltype_bs${bs_item}_${fp_item}_${run_mode}_${device_num}
IFS
=
"_"
IFS
=
"_"
params_list
=(
${
PARAMS
}
)
params_list
=(
${
PARAMS
}
)
model_type
=
${
params_list
[0]
}
model_type
=
${
params_list
[0]
}
batch_size
=
${
params_list
[1]
}
batch_size
=
${
params_list
[1]
}
batch_size
=
`
echo
${
batch_size
}
|
tr
-cd
"[0-9]"
`
batch_size
=
`
echo
${
batch_size
}
|
tr
-cd
"[0-9]"
`
precision
=
${
params_list
[2]
}
precision
=
${
params_list
[2]
}
run_process_type
=
${
params_list
[3]
}
#
run_process_type=${params_list[3]}
run_mode
=
${
params_list
[
4
]
}
run_mode
=
${
params_list
[
3
]
}
device_num
=
${
params_list
[
5
]
}
device_num
=
${
params_list
[
4
]
}
IFS
=
";"
IFS
=
";"
if
[
${
precision
}
=
"null"
]
;
then
if
[
${
precision
}
=
"null"
]
;
then
...
...
test_tipc/docs/benchmark_train.md
浏览文件 @
e7955672
...
@@ -19,27 +19,24 @@ bash test_tipc/prepare.sh test_tipc/configs/det_mv3_db_v2_0/train_benchmark.txt
...
@@ -19,27 +19,24 @@ bash test_tipc/prepare.sh test_tipc/configs/det_mv3_db_v2_0/train_benchmark.txt
# 运行格式:bash test_tipc/benchmark_train.sh train_benchmark.txt mode
# 运行格式:bash test_tipc/benchmark_train.sh train_benchmark.txt mode
bash test_tipc/benchmark_train.sh test_tipc/configs/det_mv3_db_v2_0/train_infer_python.txt benchmark_train
bash test_tipc/benchmark_train.sh test_tipc/configs/det_mv3_db_v2_0/train_infer_python.txt benchmark_train
# 单机多卡训练,MultiP 表示多进程;单卡训练用SingleP
# 运行格式:bash test_tipc/benchmark_train.sh train_benchmark.txt mode
bash test_tipc/benchmark_train.sh test_tipc/configs/det_mv3_db_v2_0/train_infer_python.txt benchmark_train
```
```
`test_tipc/benchmark_train.sh`
支持根据传入的第三个参数实现只运行某一个训练配置,如下:
`test_tipc/benchmark_train.sh`
支持根据传入的第三个参数实现只运行某一个训练配置,如下:
```
shell
```
shell
# 运行格式:bash test_tipc/benchmark_train.sh train_benchmark.txt mode
# 运行格式:bash test_tipc/benchmark_train.sh train_benchmark.txt mode
bash test_tipc/benchmark_train.sh test_tipc/configs/det_mv3_db_v2_0/train_infer_python.txt benchmark_train dynamic_bs8_
null_SingleP
_DP_N1C1
bash test_tipc/benchmark_train.sh test_tipc/configs/det_mv3_db_v2_0/train_infer_python.txt benchmark_train dynamic_bs8_
fp32
_DP_N1C1
```
```
dynamic_bs8_
null_SingleP
_DP_N1C1为test_tipc/benchmark_train.sh传入的参数,格式如下:
dynamic_bs8_
fp32
_DP_N1C1为test_tipc/benchmark_train.sh传入的参数,格式如下:
`${modeltype}_${batch_size}_${fp_item}_${run_
process_type}_${run_
mode}_${device_num}`
`${modeltype}_${batch_size}_${fp_item}_${run_mode}_${device_num}`
包含的信息有:模型类型、batchsize大小、训练精度如fp32,fp16等、分布式
训练进程类型、分布式
运行模式以及分布式训练使用的机器信息如单机单卡(N1C1)。
包含的信息有:模型类型、batchsize大小、训练精度如fp32,fp16等、分布式运行模式以及分布式训练使用的机器信息如单机单卡(N1C1)。
## 2. 日志输出
## 2. 日志输出
运行后将
输出模型的训练日志和日志
解析日志,使用
`test_tipc/configs/det_mv3_db_v2_0/train_benchmark.txt`
参数文件的训练日志解析结果是:
运行后将
保存模型的训练日志和
解析日志,使用
`test_tipc/configs/det_mv3_db_v2_0/train_benchmark.txt`
参数文件的训练日志解析结果是:
```
```
{"model_branch": "dygaph", "model_commit": "7c39a1996b19087737c05d883fd346d2f39dbcc0", "model_name": "det_mv3_db_v2_0_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": "
imag
es/s", "device_num": "N1C1", "model_run_time": "0", "frame_commit": "8cc09552473b842c651ead3b9848d41827a3dbab", "frame_version": "0.0.0"}
{"model_branch": "dygaph", "model_commit": "7c39a1996b19087737c05d883fd346d2f39dbcc0", "model_name": "det_mv3_db_v2_0_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": "
sampl
es/s", "device_num": "N1C1", "model_run_time": "0", "frame_commit": "8cc09552473b842c651ead3b9848d41827a3dbab", "frame_version": "0.0.0"}
```
```
训练日志和日志解析结果保存在benchmark_log目录下,文件组织格式如下:
训练日志和日志解析结果保存在benchmark_log目录下,文件组织格式如下:
...
...
tools/program.py
浏览文件 @
e7955672
...
@@ -283,7 +283,7 @@ def train(config,
...
@@ -283,7 +283,7 @@ def train(config,
eta_sec_format
=
str
(
datetime
.
timedelta
(
seconds
=
int
(
eta_sec
)))
eta_sec_format
=
str
(
datetime
.
timedelta
(
seconds
=
int
(
eta_sec
)))
strs
=
'epoch: [{}/{}], global_step: {}, {}, avg_reader_cost: '
\
strs
=
'epoch: [{}/{}], global_step: {}, {}, avg_reader_cost: '
\
'{:.5f} s, avg_batch_cost: {:.5f} s, avg_samples: {}, '
\
'{:.5f} s, avg_batch_cost: {:.5f} s, avg_samples: {}, '
\
'ips: {:.5f} , eta: {}'
.
format
(
'ips: {:.5f}
samples/s
, eta: {}'
.
format
(
epoch
,
epoch_num
,
global_step
,
logs
,
epoch
,
epoch_num
,
global_step
,
logs
,
train_reader_cost
/
print_batch_step
,
train_reader_cost
/
print_batch_step
,
train_batch_cost
/
print_batch_step
,
train_batch_cost
/
print_batch_step
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录