Skip to content

Instantly share code, notes, and snippets.

@Ouwen
Created July 27, 2018 06:15
Show Gist options
  • Save Ouwen/831e67f9b3aad631ce4de0818076202d to your computer and use it in GitHub Desktop.
Save Ouwen/831e67f9b3aad631ce4de0818076202d 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.zeros_initializer())
sess = tf.Session(graph=g1);
sess.run(v.initializer)
# sess.run(tf.global_variables_initializer())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment