Fix interpretation of --max-epoch
@@ -82,7 +82,7 @@ def main(args):
train_meter.start()
valid_losses = [None]
valid_subsets = args.valid_subset.split(',')
- while lr > args.min_lr and epoch_itr.epoch <= max_epoch and trainer.get_num_updates() < max_update:
+ while lr > args.min_lr and epoch_itr.epoch < max_epoch and trainer.get_num_updates() < max_update:
# train for one epoch
train(args, trainer, task, epoch_itr)
