我为第二个受访者运行代码并发现错误。 tensorflow batch normalizatioon second respondents 错误图片
答案 0 :(得分:2)
运行操作时,必须为feed_dict
提供值。
以下是一个示例程序:
import tensorflow as tf
# Define the inputs you will feed into the tensorflow computation graph
a = tf.placeholder(tf.int32, shape=[1], name="a")
x = tf.placeholder(tf.int32, shape=[4], name="x")
# This is the actual computation we want to run.
output = a * x
with tf.Session() as sess:
# Actually run the computation, feeding in [10] for a, and [1, 2, 3, 4] for x.
# This will print out: [10 20 30 40]
print sess.run(output, feed_dict={a: [10], x: [1, 2, 3, 4]})