tensorflow之placeholder的理解
硬件:NVIDIA-GTX1080
软件:Windows7、python3.6.5、tensorflow-gpu-1.4.0
一、基础知识
placeholder:先hold一块区域,用喂食的方式输入数据
二、代码展示
import tensorflow as tf
input1 = tf.placeholder(tf.float32)
input2 = tf.placeholder(tf.float32)
output = tf.multiply(input1, input2)
with tf.Session() as sess:
print(sess.run(output, feed_dict = {input1:[7.0], input2: [4.0]}))
三、输出结果
[28.]
任何问题请加唯一QQ2258205918(名称samylee)!
或唯一VX:samylee_csdn
1万+

被折叠的 条评论
为什么被折叠?



