mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-09 11:32:07 +08:00
Fix off-by-one epoch length (#377)
This commit is contained in:
committed by
William Falcon
parent
82223275ba
commit
0fac2d64cf
@@ -1128,7 +1128,7 @@ class Trainer(TrainerIOMixin):
|
||||
# stop when the flag is changed or we've gone past the amount
|
||||
# requested in the batches
|
||||
self.total_batch_nb += 1
|
||||
met_batch_limit = batch_nb > self.nb_training_batches
|
||||
met_batch_limit = batch_nb >= self.nb_training_batches
|
||||
if met_batch_limit:
|
||||
break
|
||||
|
||||
|
||||
Reference in New Issue
Block a user