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

Method __iter__

tensorpack/dataflow/common.py:834–844  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

832 return u'\n'.join(msg)
833
834 def __iter__(self):
835 for dp in self.ds:
836 # it is important to place this here! otherwise it mixes the output of multiple PrintData
837 if self.cnt == 0:
838 label = ' (%s)' % self.name if self.name is not None else ""
839 logger.info(colored("Contents of DataFlow%s:" % label, 'cyan'))
840
841 if self.cnt < self.num:
842 print(self._get_msg(dp))
843 self.cnt += 1
844 yield dp
845
846 def reset_state(self):
847 super(PrintData, self).reset_state()

Callers

nothing calls this directly

Calls 1

_get_msgMethod · 0.95

Tested by

no test coverage detected