Tensorflow, missing checkpoint files. Does saver only allow for keeping 5 check points?
<p>I am working with tensorflow and have been training some models and saving them after each epoch using the  <code>tf.saver()</code> method. I am able to save and load models just fine and I am doing this in the usual way.</p>

<pre><code>with tf.Graph().as_default(), tf.Session() as session:
    initialiser = tf.random_normal_initializer(config.mean, config.std)

    with tf.variable_scope("model",reuse=None, initializer=initialiser):
        m = a2p(session, config, training=True)

    saver = tf.train.Saver()   
    ckpt = tf.train.get_checkpoint_state(model_dir)
    if ckpt and tf.gfile.Exists(ckpt.model_checkpoint_path)
        saver.restore(session, ckpt.model_checkpoint_path)
    ...
    for i in range(epochs):
       runepoch()
       save_path = saver.save(session, '%s.ckpt'%i)
</code></pre>

<p>My code is set up to save a model for each epoch which should be labelled accordingly. However, I have noticed that after fifteen epochs of training I only have check point files for the last five epochs (10, 11, 12, 13,14). The documentation doesn't say anything about this so I am at a loss as to why it is happening.</p>

<p>Does the saver only allow for keeping five checkpoints or have I done something wrong?</p>

<p>Is there a way to make sure that all of the checkpoints are kept?</p>