title: How to restore a specific checkpoint in tensorflow2 (to implement early stopping)?
body: <p>I used the following code to create a checkpoint manager outside of the loop that I train my model:</p>
  <pre><code>checkpoint_path = &quot;./checkpoints/train&quot;
  
  ckpt = tf.train.Checkpoint(object_1=object_1)
  
  ckpt_manager = tf.train.CheckpointManager(ckpt, checkpoint_path, max_to_keep=1)
  
  </code></pre>
  <p>Then while training the model, I use <code>ckpt_save_path = ckpt_manager.save()</code> to save the variables after each epoch.</p>
  <p>Given that I want to implement an early stopping approach, I need to restore all the variables after a specific epoch and use those variables to do a prediction. How can I restore the variable after let's say epoch e if I have used the above code to save the variables (hope the saving process is correct?). I know I can first create the same variables and objects and then use the following code to restore the latest checkpoint, but have no idea how to restore specific checkpoints (like the variables after epoch number e) and not the latest.</p>
  <p><code>ckpt.restore(ckpt_manager.latest_checkpoint).assert_consumed()</code></p>
  <p>Thanks,</p>