(self)
| 109 | return |
| 110 | |
| 111 | def __next__(self): |
| 112 | assert self.p is not None, 'call start before next' |
| 113 | while self.queue.empty(): |
| 114 | time.sleep(0.1) |
| 115 | x, y = self.queue.get() # dequeue one mini-batch |
| 116 | return x, y |
| 117 | |
| 118 | def end(self): |
| 119 | if self.p is not None: |