This commit is contained in:
wassname
2020-01-26 11:59:39 +08:00
parent b41f76c7c5
commit 7ca9f111f5
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -294,8 +294,8 @@ class TrainerEvaluationLoopMixin(ABC):
position = 2 * self.process_position + (not test)
desc = 'Testing' if test else 'Validating'
pbar = tqdm(desc=desc, total=max_batches, leave=test, position=position,
disable=not self.show_progress_bar, dynamic_ncols=True,
unit='batch', file=sys.stdout)
disable=not self.show_progress_bar, dynamic_ncols=True,
unit='batch', file=sys.stdout)
setattr(self, f'{"test" if test else "val"}_progress_bar', pbar)
# run evaluation
+2 -2
View File
@@ -829,8 +829,8 @@ class Trainer(TrainerIOMixin,
# init progress bar
pbar = tqdm(leave=True, position=2 * self.process_position,
disable=not self.show_progress_bar, dynamic_ncols=True, unit='batch',
file=sys.stdout)
disable=not self.show_progress_bar, dynamic_ncols=True, unit='batch',
file=sys.stdout)
self.main_progress_bar = pbar
# clear cache before training