Skip to content

Instantly share code, notes, and snippets.

@Ouwen
Created July 27, 2018 06:21
Show Gist options
  • Save Ouwen/beed8f475571f96d24971e8173772be7 to your computer and use it in GitHub Desktop.
Save Ouwen/beed8f475571f96d24971e8173772be7 to your computer and use it in GitHub Desktop.
import tensorflow as tf
g1 = tf.Graph()
with g1.as_default():
v = tf.get_variable(name="v", shape=(), initializer=tf.glorot_uniform_initializer())
saver = tf.train.Saver()
sess = tf.Session(graph=g1);
saver.restore(sess, "/tmp/model.ckpt")
sess.run(v)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment