Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
models
提交
554d8864
M
models
项目概览
PaddlePaddle
/
models
大约 1 年 前同步成功
通知
222
Star
6828
Fork
2962
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
602
列表
看板
标记
里程碑
合并请求
255
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
models
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
602
Issue
602
列表
看板
标记
里程碑
合并请求
255
合并请求
255
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
554d8864
编写于
9月 26, 2019
作者:
Y
Yiqun Liu
提交者:
GitHub
9月 26, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Print out 4 numbers after the decimal point when printing time. (#3426)
test=develop
上级
10b6aa85
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
3 addition
and
3 deletion
+3
-3
PaddleCV/image_classification/utils/utility.py
PaddleCV/image_classification/utils/utility.py
+3
-3
未找到文件。
PaddleCV/image_classification/utils/utility.py
浏览文件 @
554d8864
...
@@ -332,21 +332,21 @@ def print_info(pass_id, batch_id, print_step, metrics, time_info, info_mode):
...
@@ -332,21 +332,21 @@ def print_info(pass_id, batch_id, print_step, metrics, time_info, info_mode):
print
(
print
(
"[Pass {0}, train batch {1}]
\t
loss {2}, lr {3}, elapse {4}"
.
"[Pass {0}, train batch {1}]
\t
loss {2}, lr {3}, elapse {4}"
.
format
(
pass_id
,
batch_id
,
"%.5f"
%
loss
,
"%.5f"
%
lr
,
format
(
pass_id
,
batch_id
,
"%.5f"
%
loss
,
"%.5f"
%
lr
,
"%2.
2
f sec"
%
time_info
))
"%2.
4
f sec"
%
time_info
))
# train and no mixup output
# train and no mixup output
elif
len
(
metrics
)
==
4
:
elif
len
(
metrics
)
==
4
:
loss
,
acc1
,
acc5
,
lr
=
metrics
loss
,
acc1
,
acc5
,
lr
=
metrics
print
(
print
(
"[Pass {0}, train batch {1}]
\t
loss {2}, acc1 {3}, acc5 {4}, lr {5}, elapse {6}"
.
"[Pass {0}, train batch {1}]
\t
loss {2}, acc1 {3}, acc5 {4}, lr {5}, elapse {6}"
.
format
(
pass_id
,
batch_id
,
"%.5f"
%
loss
,
"%.5f"
%
acc1
,
format
(
pass_id
,
batch_id
,
"%.5f"
%
loss
,
"%.5f"
%
acc1
,
"%.5f"
%
acc5
,
"%.5f"
%
lr
,
"%2.
2
f sec"
%
time_info
))
"%.5f"
%
acc5
,
"%.5f"
%
lr
,
"%2.
4
f sec"
%
time_info
))
# test output
# test output
elif
len
(
metrics
)
==
3
:
elif
len
(
metrics
)
==
3
:
loss
,
acc1
,
acc5
=
metrics
loss
,
acc1
,
acc5
=
metrics
print
(
print
(
"[Pass {0}, test batch {1}]
\t
loss {2}, acc1 {3}, acc5 {4}, elapse {5}"
.
"[Pass {0}, test batch {1}]
\t
loss {2}, acc1 {3}, acc5 {4}, elapse {5}"
.
format
(
pass_id
,
batch_id
,
"%.5f"
%
loss
,
"%.5f"
%
acc1
,
format
(
pass_id
,
batch_id
,
"%.5f"
%
loss
,
"%.5f"
%
acc1
,
"%.5f"
%
acc5
,
"%2.
2
f sec"
%
time_info
))
"%.5f"
%
acc5
,
"%2.
4
f sec"
%
time_info
))
else
:
else
:
raise
Exception
(
raise
Exception
(
"length of metrics {} is not implemented, It maybe caused by wrong format of build_program_output"
.
"length of metrics {} is not implemented, It maybe caused by wrong format of build_program_output"
.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录