(self)
| 63 | self._bar = None |
| 64 | |
| 65 | def _before_train(self): |
| 66 | self._last_updated = self.local_step |
| 67 | |
| 68 | self._total = self.trainer.steps_per_epoch |
| 69 | self._tqdm_args = get_tqdm_kwargs(leave=True) |
| 70 | |
| 71 | self._fetches = self.get_tensors_maybe_in_tower(self._names) or None |
| 72 | if self._fetches: |
| 73 | for t in self._fetches: |
| 74 | assert t.shape.ndims == 0, "ProgressBar can only print scalars, not {}".format(t) |
| 75 | self._fetches = tf.train.SessionRunArgs(self._fetches) |
| 76 | self._tqdm_args['bar_format'] = self._tqdm_args['bar_format'] + "{postfix} " |
| 77 | |
| 78 | def _before_epoch(self): |
| 79 | self._bar = tqdm.trange(self._total, **self._tqdm_args) |
nothing calls this directly
no test coverage detected