placehold和feed_dict必须一起用,feed_dict用于传入数值
import tensorflow as tf
a1=tf.placeholder(tf.float32)
a2=tf.placeholder(tf.float32)
output=tf.multiply(a1,a2)
with tf.Session() as sess:
print(sess.run(output,feed_dict={a1:[5.],a2:[2.]}))
placehold和feed_dict必须一起用,feed_dict用于传入数值
import tensorflow as tf
a1=tf.placeholder(tf.float32)
a2=tf.placeholder(tf.float32)
output=tf.multiply(a1,a2)
with tf.Session() as sess:
print(sess.run(output,feed_dict={a1:[5.],a2:[2.]}))