输出结果
代码设计
#TF:TF定义两个变量相乘之placeholder先hold类似变量+feed_dict最后外界传入值
import tensorflow as tf
input1 = tf.placeholder(tf.float32) #TF一般只能处理float32的数据类型
input2 = tf.placeholder(tf.float32)
#ouput = tf.mul(input1, input2)
ouput = tf.multiply(input1, input2) #定义两个变量相乘
with tf.Session() as sess:
print(sess.run(ouput, feed_dict={input1: [1009.], input2: [2.]}))