2017-01-11 3 views

ответ

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]}) 
Смежные вопросы

 Смежные вопросы