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

Method _init_memory

examples/DeepQNetwork/expreplay.py:319–326  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

317 self.mem = ReplayMemory(memory_size, state_shape, self.history_len, dtype=state_dtype)
318
319 def _init_memory(self):
320 logger.info("Populating replay memory with epsilon={} ...".format(self.exploration))
321
322 with get_tqdm(total=self.init_memory_size) as pbar:
323 while len(self.mem) < self.init_memory_size:
324 self.runner.step(self.exploration)
325 pbar.update()
326 self._init_memory_flag.set()
327
328 # quickly fill the memory for debug
329 def _fake_init_memory(self):

Callers 1

_before_trainMethod · 0.95

Calls 4

get_tqdmFunction · 0.90
formatMethod · 0.80
updateMethod · 0.80
stepMethod · 0.45

Tested by

no test coverage detected