Update progress.py (#2268)

Fixes a minor bug introduced in #2213
This commit is contained in:
Paweł Biernat 2020-06-19 19:47:39 +00:00 committed by GitHub
parent e0b7fed92e
commit 3256fe4e5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -97,8 +97,7 @@ class ProgressBarBase(Callback):
total_val_batches = len(trainer.val_dataloaders) total_val_batches = len(trainer.val_dataloaders)
elif not self.trainer.disable_validation: elif not self.trainer.disable_validation:
is_val_epoch = trainer.current_epoch % trainer.check_val_every_n_epoch == 0 is_val_epoch = trainer.current_epoch % trainer.check_val_every_n_epoch == 0
total_val_batches = trainer.num_val_batches if is_val_epoch else 0 total_val_batches = sum(trainer.num_val_batches) if is_val_epoch else 0
total_val_batches = sum(total_val_batches)
return total_val_batches return total_val_batches
@property @property