Last active
July 27, 2018 05:41
-
-
Save Ouwen/c073165321b8c3987d1c8f4552df0538 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
g1 = tf.Graph() | |
with g1.as_default(): | |
# Add a single variable to our graph | |
v = tf.get_variable(name="v", shape=(), initializer=tf.glorot_uniform_initializer()) | |
sess = tf.Session(graph=g1) | |
sess.run(v.initializer) # Run just the initializer on our variable | |
# sess.run(tf.global_variables_initializer()) # This will initialize all variables | |
print(sess.run(v)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment