pointer-generator
pointer-generator copied to clipboard
How to check the number or iterations?
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?
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()