allenai / bilm-tf

Tensorflow implementation of contextualized word representations from bi-directional language models
Apache License 2.0
1.62k stars 452 forks source link

Give an option for the Checkpoint frequency #206

Open aryankhandal0 opened 5 years ago

aryankhandal0 commented 5 years ago

I want to suggest an option for the checkpoint frequency, i.e. we can change the checkpoints to save at 1000 batches or 100000 batches or any number we want. Where should the option be present in train_elmo.py? if batch_no % Batches_After_Checkpoint== 0:

write the summaries to tensorboard and display perplexity

            summary_writer.add_summary(ret[1], batch_no)
            print("Batch %s, train_perplexity=%s" % (batch_no, ret[2]))
            print("Total time: %s" % (time.time() - t1))