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

Method start

tensorpack/dataflow/common.py:52–68  ·  view source on GitHub ↗

Start testing with a progress bar.

(self)

Source from the content-addressed store, hash-verified

50 yield from self.ds
51
52 def start(self):
53 """
54 Start testing with a progress bar.
55 """
56 if not self._reset_called:
57 self.ds.reset_state()
58 itr = self.ds.__iter__()
59 if self.warmup:
60 for _ in tqdm.trange(self.warmup, **get_tqdm_kwargs()):
61 next(itr)
62 # add smoothing for speed benchmark
63 with get_tqdm(total=self.test_size,
64 leave=True, smoothing=0.2) as pbar:
65 for idx, dp in enumerate(itr):
66 pbar.update()
67 if idx == self.test_size - 1:
68 break
69
70
71class BatchData(ProxyDataFlow):

Callers 15

__iter__Method · 0.95
_before_trainMethod · 0.45
reset_stateMethod · 0.45
reset_stateMethod · 0.45
executeMethod · 0.45
imagenet_utils.pyFile · 0.45
__init__Method · 0.45
simulator.pyFile · 0.45
eval_with_funcsFunction · 0.45
_before_trainMethod · 0.45
imagenet_utils.pyFile · 0.45

Calls 5

get_tqdm_kwargsFunction · 0.85
get_tqdmFunction · 0.85
updateMethod · 0.80
reset_stateMethod · 0.45
__iter__Method · 0.45

Tested by

no test coverage detected