Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
VisualDL
提交
617c2dec
V
VisualDL
项目概览
PaddlePaddle
/
VisualDL
接近 2 年 前同步成功
通知
89
Star
4655
Fork
642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
5
Wiki
分析
仓库
DevOps
项目成员
Pages
V
VisualDL
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
5
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
617c2dec
编写于
1月 15, 2018
作者:
Y
Yan Chunwei
提交者:
GitHub
1月 15, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bugfix/image get sample out of range (#136)
上级
971578c6
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
18 addition
and
14 deletion
+18
-14
visualdl/server/lib.py
visualdl/server/lib.py
+18
-14
未找到文件。
visualdl/server/lib.py
浏览文件 @
617c2dec
...
@@ -6,6 +6,7 @@ from tempfile import NamedTemporaryFile
...
@@ -6,6 +6,7 @@ from tempfile import NamedTemporaryFile
import
numpy
as
np
import
numpy
as
np
from
PIL
import
Image
from
PIL
import
Image
from
log
import
logger
def
get_modes
(
storage
):
def
get_modes
(
storage
):
...
@@ -102,20 +103,23 @@ def get_image_tag_steps(storage, mode, tag):
...
@@ -102,20 +103,23 @@ def get_image_tag_steps(storage, mode, tag):
shape
=
record
.
shape
()
shape
=
record
.
shape
()
# TODO(ChunweiYan) remove this trick, some shape will be empty
# TODO(ChunweiYan) remove this trick, some shape will be empty
if
not
shape
:
continue
if
not
shape
:
continue
# assert shape, "%s,%s" % (mode, tag)
try
:
query
=
urllib
.
urlencode
({
query
=
urllib
.
urlencode
({
'sample'
:
0
,
'sample'
:
0
,
'index'
:
step_index
,
'index'
:
step_index
,
'tag'
:
origin_tag
,
'tag'
:
origin_tag
,
'run'
:
mode
,
'run'
:
mode
,
})
})
res
.
append
({
res
.
append
({
'height'
:
shape
[
0
],
'height'
:
shape
[
0
],
'width'
:
shape
[
1
],
'width'
:
shape
[
1
],
'step'
:
record
.
step_id
(),
'step'
:
record
.
step_id
(),
'wall_time'
:
image
.
timestamp
(
step_index
),
'wall_time'
:
image
.
timestamp
(
step_index
),
'query'
:
query
,
'query'
:
query
,
})
})
except
:
logger
.
error
(
"image sample out of range"
)
return
res
return
res
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录