pointer-generator icon indicating copy to clipboard operation
pointer-generator copied to clipboard

How to check the number or iterations?

Open karansaxena opened this issue 7 years ago • 1 comments

The --max_enc_steps and --max_dec_steps flags are being changed after a certain number of iterations. I am not quite sure how do I check the current iteration number. One way is that I can see the checkpoint name in the saved model filename, but is there a better way?

karansaxena avatar Oct 19 '18 04:10 karansaxena

Just add some code, like tf.logging.info(train_step)

# get the summaries and iteration number so we can write summaries to tensorboard
summaries = results['summaries'] # we will write these summaries to tensorboard using summary_writer
train_step = results['global_step'] # we need this to update our running average loss

summary_writer.add_summary(summaries, train_step) # write the summaries
if train_step % 100 == 0: # flush the summary writer every so often
    tf.logging.info(train_step) # !!!!add it here!!!!
    summary_writer.flush()

miangangzhen avatar Feb 01 '19 00:02 miangangzhen