MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / __iter__

Method __iter__

tensorpack/dataflow/parallel.py:228–233  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

226 self._reset_done = False
227
228 def __iter__(self):
229 for k in itertools.count():
230 if self._size > 0 and k >= self._size:
231 break
232 dp = self.queue.get()
233 yield dp
234
235 def reset_state(self):
236 assert not self._reset_done, "reset_state() was called twice! This violates the API of DataFlow!"

Callers

nothing calls this directly

Calls 2

countMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected