tensorflowcheckpointing

How to change the frequency of checkpoint saving in Tensorflow API


I'm training a model using Tensorflow API. It saves a checkpoint every 1000 steps. However, I would like to reduce that to 500 steps, and I can't find the place to configure it.

I would appreciate some help to find a way to change configuration settings.


Solution

  • It's very simple. Just add this flag to your training script:

    --checkpoint_every_n=500

    For example:

    python {training_script} --model_dir={checkpoint_path} --pipeline_config_path={pipeline_config_path} --num_train_steps=20000 --checkpoint_every_n=500