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{}
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{}