Commit 22582cc7 authored by Yuxin Wu's avatar Yuxin Wu

update

parent bc5b5cc0
......@@ -111,6 +111,9 @@ class DataFromGenerator(DataFlow):
else:
yield from self._gen()
def __len__(self):
return len(self._gen)
class DataFromIterable(DataFlow):
""" Wrap an iterable of datapoints to a DataFlow"""
......
......@@ -260,7 +260,7 @@ class ChainInit(SessionInit):
i._run_init(sess)
def SmartInit(obj, ignore_mismatch=False):
def SmartInit(obj, *, ignore_mismatch=False):
"""
Create a :class:`SessionInit` to be loaded to a session,
automatically from any supported objects, with some smart heuristics.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment