import tensorflow as tf
a = tf.Variable(tf.random_uniform(shape=[10, 10]))
with tf.Session() as sess:
#必须调用,否则a没办法初始化值
sess.run(tf.global_variables_initializer())
print sess.run(a)
标签:调用 lob on() 变量 form var variable div 否则
import tensorflow as tf
a = tf.Variable(tf.random_uniform(shape=[10, 10]))
with tf.Session() as sess:
#必须调用,否则a没办法初始化值
sess.run(tf.global_variables_initializer())
print sess.run(a)
标签:调用 lob on() 变量 form var variable div 否则
原文地址:https://www.cnblogs.com/linyuanzhou/p/8530777.html