title: Save TensorFlow checkpoint in a Google Colab
body: <p>I'm trying to save my trained model using a <a href="https://www.tensorflow.org/api_docs/python/tf/train/Saver" rel="nofollow noreferrer">TF.train.Saver()</a></p>
  
  <pre><code>saver = tf.train.Saver()
  
  with tf.Session() as sess:
    [...]
    save_path = saver.save(sess, "/final_model.ckpt")
  </code></pre>
  
  <p>I know this works on a local computer, but when I'm trying to run it on a Google Colab, it does not and gives me the following error:</p>
  
  <blockquote>
    <p>ValueError: Parent directory of final_model.ckpt doesn't exist</p>
  </blockquote>
  
  <p>I have performed the answer proposed <a href="https://stackoverflow.com/questions/54230871/google-colab-valueerror-mountpoint-must-be-in-a-directory-that-exists">here</a>,</p>
  
  <pre><code>from google.colab import drive
  drive.mount('/content/gdrive/')
  </code></pre>
  
  <p>but my saved model will not be placed in the current directory. It goes into <code>content</code> folder where I do not see in My Drive.</p>
  
  <p>My code is under <code>My Drive/TF 01/some method/</code> and I would like to save the checkpoints and logs in the same folder.</p>