Tensorflow feed_dict={}

时间:2020-04-01 17:46:59   收藏:0   阅读:86

tensorflow 在有占位符  tf.placeholder时 ,需要用 feed_dict喂入数据。

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]}))

 

原文:https://www.cnblogs.com/gaona666/p/12613607.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!