未验证 提交 617c2dec 编写于 作者: Y Yan Chunwei 提交者: GitHub

bugfix/image get sample out of range (#136)

上级 971578c6
......@@ -6,6 +6,7 @@ from tempfile import NamedTemporaryFile
import numpy as np
from PIL import Image
from log import logger
def get_modes(storage):
......@@ -102,7 +103,7 @@ def get_image_tag_steps(storage, mode, tag):
shape = record.shape()
# TODO(ChunweiYan) remove this trick, some shape will be empty
if not shape: continue
# assert shape, "%s,%s" % (mode, tag)
try:
query = urllib.urlencode({
'sample': 0,
'index': step_index,
......@@ -116,6 +117,9 @@ def get_image_tag_steps(storage, mode, tag):
'wall_time': image.timestamp(step_index),
'query': query,
})
except:
logger.error("image sample out of range")
return res
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册