diff --git a/tools/program.py b/tools/program.py index 57447caa..870d2700 100755 --- a/tools/program.py +++ b/tools/program.py @@ -253,7 +253,7 @@ def train_eval_det_run(config, exe, train_info_dict, eval_info_dict): t2 = time.time() train_batch_elapse = t2 - t1 train_stats.update(stats) - if train_batch_id > start_eval_step and train_batch_id \ + if train_batch_id > start_eval_step and (train_batch_id -start_eval_step) \ % print_batch_step == 0: logs = train_stats.log() strs = 'epoch: {}, iter: {}, {}, time: {:.3f}'.format( @@ -338,7 +338,7 @@ def train_eval_rec_run(config, exe, train_info_dict, eval_info_dict): train_batch_elapse = t2 - t1 stats = {'loss': loss, 'acc': acc} train_stats.update(stats) - if train_batch_id > start_eval_step and train_batch_id \ + if train_batch_id > start_eval_step and (train_batch_id - start_eval_step) \ % print_batch_step == 0: logs = train_stats.log() strs = 'epoch: {}, iter: {}, lr: {:.6f}, {}, time: {:.3f}'.format(