Fix off-by-one epoch length (#377)

This commit is contained in:
Hiroyuki Vincent Yamazaki authored and William Falcon committed 2019-10-18 10:18:05 +02:00
1 parent 82223275ba
commit 0fac2d64cf
1 file changed
+1 -1
+1 -1
View File
@@ -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