提交 b359d5c5 编写于 作者: G gongweibao

restore creator.py

上级 8c735c8b
......@@ -16,7 +16,7 @@ Creator package contains some simple reader creator, which could be used in user
program.
"""
__all__ = ['np_array', 'text_file', "RecordIO"]
__all__ = ['np_array', 'text_file']
def np_array(x):
......@@ -55,22 +55,3 @@ def text_file(path):
f.close()
return reader
def RecordIO(path):
"""
Creates a data reader that outputs record one one by one from given recordio file
:path: path of recordio file
:returns: data reader of recordio file
"""
def reader():
f = recordio.reader(path)
while True:
r = f.read()
if r is None:
break
yield r
f.close()
return reader
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册