Skip to content

Commit 0b09300

Browse files
JimHeoaquariusjay
authored andcommitted
Fix vis.py for the issue Waiting for new Checkpoint (#6789)
1 parent 03027e3 commit 0b09300

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

research/deeplab/vis.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,7 @@ def main(unused_argv):
276276
checkpoints_iterator = tf.contrib.training.checkpoints_iterator(
277277
FLAGS.checkpoint_dir, min_interval_secs=FLAGS.eval_interval_secs)
278278
for checkpoint_path in checkpoints_iterator:
279-
if max_num_iteration > 0 and num_iteration > max_num_iteration:
280-
break
281279
num_iteration += 1
282-
283280
tf.logging.info(
284281
'Starting visualization at ' + time.strftime('%Y-%m-%d-%H:%M:%S',
285282
time.gmtime()))
@@ -313,6 +310,8 @@ def main(unused_argv):
313310
tf.logging.info(
314311
'Finished visualization at ' + time.strftime('%Y-%m-%d-%H:%M:%S',
315312
time.gmtime()))
313+
if max_num_iteration > 0 and num_iteration >= max_num_iteration:
314+
break
316315

317316
if __name__ == '__main__':
318317
flags.mark_flag_as_required('checkpoint_dir')

0 commit comments

Comments
 (0)