tensorflow--placeholder数据类型

import tensorflow as tf

#placeholder数据类型
a = tf.placeholder(tf.float32)
b = tf.placeholder(tf.float32)
myadd = tf.add(a,b)
with tf.Session() as sess:
    print(sess.run(myadd,feed_dict={a:35,b:20}))   #参数一为tensor,参数二为feed_dict{}

 

posted @ 2019-07-10 09:52  山…隹  阅读(604)  评论(0编辑  收藏  举报