Skip to content

Instantly share code, notes, and snippets.

@mrahtz
Created Mar 6, 2018
Embed
What would you like to do?
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