Skip to content

Instantly share code, notes, and snippets.

@mrahtz
Created March 6, 2018 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrahtz/2c174a09b0a5d8522a6a28485caf9353 to your computer and use it in GitHub Desktop.
Save mrahtz/2c174a09b0a5d8522a6a28485caf9353 to your computer and use it in GitHub Desktop.
import tensorflow as tf
import time
sess = tf.Session()
var = tf.Variable(0)
saver = tf.train.Saver(max_to_keep=1)
sess.run(var.initializer)
i = 0
while True:
print(i)
saver.save(sess, '/output/checkpoint', i)
i += 1
time.sleep(0.2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment