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

This commit is contained in:
Hiroyuki Vincent Yamazaki
2019-10-18 10:18:05 +02:00
committed by William Falcon
parent 82223275ba
commit 0fac2d64cf
+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