Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_41840029
PaddleOCR
提交
d666de85
P
PaddleOCR
项目概览
weixin_41840029
/
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看板
提交
d666de85
编写于
2月 07, 2022
作者:
L
LDOUBLEV
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
delete debug
上级
28996943
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
8 addition
and
9 deletion
+8
-9
test_tipc/benchmark_trainv2.sh
test_tipc/benchmark_trainv2.sh
+7
-8
tools/program.py
tools/program.py
+1
-1
未找到文件。
test_tipc/benchmark_trainv2.sh
浏览文件 @
d666de85
...
...
@@ -117,7 +117,7 @@ if [ ${precision} = "null" ];then
fi
# set env
python
=
python
3.7
python
=
python
export
model_branch
=
`
git symbolic-ref HEAD 2>/dev/null |
cut
-d
"/"
-f
3
`
export
model_commit
=
$(
git log|head
-n1
|awk
'{print $2}'
)
export
str_tmp
=
$(
echo
`
pip list|grep paddlepaddle-gpu|awk
-F
' '
'{print $2}'
`
)
...
...
@@ -129,6 +129,7 @@ export frame_commit=$(echo `${python} -c "import paddle;print(paddle.version.com
# line export_py: 30
func_sed_params
"
$FILENAME
"
"24"
"null"
func_sed_params
"
$FILENAME
"
"30"
"null"
func_sed_params
"
$FILENAME
"
"3"
"python"
if
[
${#
gpu_id
}
-le
1
]
;
then
...
...
@@ -139,7 +140,7 @@ if [ ${#gpu_id} -le 1 ];then
# set profile_option params
IFS
=
";"
cmd
=
"sed -i '13s/.*/
${
profile_option
}
/' '
${
FILENAME
}
'"
eval
$cmd
eval
$cmd
# run test_train_inference_python.sh
cmd
=
"bash test_tipc/test_train_inference_python.sh
${
FILENAME
}
benchmark_train >
${
log_path
}
/
${
log_name
}
2>&1 "
...
...
@@ -165,15 +166,14 @@ if [ ${#gpu_id} -le 1 ];then
# parser log
_model_name
=
"
${
model_name
}
_bs
${
batch_size
}
_
${
precision
}
_
${
run_process_type
}
_
${
run_mode
}
"
# cmd="${python} ${BENCHMARK_ROOT}/scripts/analysis.py --filename ${log_path}/${log_name} \
cmd
=
"
${
python
}
analysis.py --filename
${
log_path
}
/
${
log_name
}
\
cmd
=
"
${
python
}
${
BENCHMARK_ROOT
}
/scripts/analysis.py --filename
${
log_path
}
/
${
log_name
}
\
--speed_log_file '
${
speed_log_path
}
/
${
speed_log_name
}
'
\
--model_name
${
_model_name
}
\
--base_batch_size
${
batch_size
}
\
--run_mode
${
run_mode
}
\
--run_process_type
${
run_process_type
}
\
--fp_item
${
precision
}
\
--keyword
ip
s:
\
--keyword
samples/
s:
\
--skip_steps 2
\
--device_num
${
device_num
}
\
--speed_unit images/s
\
...
...
@@ -203,15 +203,14 @@ else
# parser log
_model_name
=
"
${
model_name
}
_bs
${
batch_size
}
_
${
precision
}
_
${
run_process_type
}
_
${
run_mode
}
"
# cmd="python3.7 ${BENCHMARK_ROOT}/scripts/analysis.py --filename ${log_path}/${log_name} \
cmd
=
"
${
python
}
analysis.py --filename
${
log_path
}
/
${
log_name
}
\
cmd
=
"
${
python
}
${
BENCHMARK_ROOT
}
/scripts/analysis.py --filename
${
log_path
}
/
${
log_name
}
\
--speed_log_file '
${
speed_log_path
}
/
${
speed_log_name
}
'
\
--model_name
${
_model_name
}
\
--base_batch_size
${
batch_size
}
\
--run_mode
${
run_mode
}
\
--run_process_type
${
run_process_type
}
\
--fp_item
${
precision
}
\
--keyword
ip
s:
\
--keyword
samples/
s:
\
--skip_steps 2
\
--device_num
${
device_num
}
\
--speed_unit images/s
\
...
...
tools/program.py
浏览文件 @
d666de85
...
...
@@ -273,7 +273,7 @@ def train(config,
(
global_step
>
0
and
global_step
%
print_batch_step
==
0
)
or
(
idx
>=
len
(
train_dataloader
)
-
1
)):
logs
=
train_stats
.
log
()
strs
=
'epoch: [{}/{}], global_step: {}, {}, avg_reader_cost: {:.5f} s, avg_batch_cost: {:.5f} s, avg_samples: {},
ip
s: {:.5f}'
.
format
(
strs
=
'epoch: [{}/{}], global_step: {}, {}, avg_reader_cost: {:.5f} s, avg_batch_cost: {:.5f} s, avg_samples: {},
samples/
s: {:.5f}'
.
format
(
epoch
,
epoch_num
,
global_step
,
logs
,
train_reader_cost
/
print_batch_step
,
(
train_reader_cost
+
train_run_cost
)
/
print_batch_step
,
total_samples
/
print_batch_step
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录