(self)
| 362 | |
| 363 | # DataFlow method: |
| 364 | def __iter__(self): |
| 365 | # wait for memory to be initialized |
| 366 | self._init_memory_flag.wait() |
| 367 | |
| 368 | while True: |
| 369 | idx = self.rng.randint( |
| 370 | 0, len(self.mem) - self.history_len - 1, |
| 371 | size=self.batch_size) |
| 372 | batch_exp = [self.mem.sample(i) for i in idx] |
| 373 | |
| 374 | yield self._process_batch(batch_exp) |
| 375 | |
| 376 | # execute update_freq=4 new actions into memory, after each batch update |
| 377 | for _ in range(self.update_frequency): |
| 378 | self.runner.step(self.exploration) |
| 379 | |
| 380 | # Callback methods: |
| 381 | def _setup_graph(self): |
nothing calls this directly
no test coverage detected