其他分享
首页 > 其他分享> > Tensorflow学习四之placeholder

Tensorflow学习四之placeholder

作者:互联网

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],input2:[2]}))#使用placeholer必须使用feed_dict

标签:input2,feed,sess,input1,学习,tf,Tensorflow,placeholder
来源: https://blog.csdn.net/weixin_43408956/article/details/93380479