Skip to content

Commit

Permalink
Fix validation counter
Browse files Browse the repository at this point in the history
  • Loading branch information
sailordiary authored and rohitgr7 committed Mar 12, 2021
1 parent 680e83a commit 4800d46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pytorch_lightning/callbacks/progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def total_val_batches(self) -> int:
"""
total_val_batches = 0
if not self.trainer.disable_validation:
is_val_epoch = (self.trainer.current_epoch) % self.trainer.check_val_every_n_epoch == 0
is_val_epoch = (self.trainer.current_epoch + 1) % self.trainer.check_val_every_n_epoch == 0
total_val_batches = sum(self.trainer.num_val_batches) if is_val_epoch else 0
return total_val_batches

Expand Down

0 comments on commit 4800d46

Please sign in to comment.