MCPcopy Create free account
hub / github.com/tensorpack/tensorpack / _fake_init_memory

Method _fake_init_memory

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

Source from the content-addressed store, hash-verified

327
328 # quickly fill the memory for debug
329 def _fake_init_memory(self):
330 from copy import deepcopy
331 with get_tqdm(total=self.init_memory_size) as pbar:
332 while len(self.mem) < 5:
333 self.runner.step(self.exploration)
334 pbar.update()
335 while len(self.mem) < self.init_memory_size:
336 self.mem.append(deepcopy(self.mem._hist[0]))
337 pbar.update()
338 self._init_memory_flag.set()
339
340 def _debug_sample(self, sample):
341 import cv2

Callers

nothing calls this directly

Calls 4

get_tqdmFunction · 0.90
updateMethod · 0.80
appendMethod · 0.80
stepMethod · 0.45

Tested by

no test coverage detected