标签:数据 oba out on() tensor output inpu 指定 code
Placeholder可以用来取数据import tensorflow as tf
input_1 = tf.placeholder(tf.float32)#先把坑占了,不用提前指定具体值
input_2 = tf.placeholder(tf.float32)#比如每个batch
output_op = tf.multiply(input_1,input_2)
with tf.Session() as sess:
sess.run(tf.global_variables_initializer())
var_res = sess.run([output_op], feed_dict={input_1:[1.0], input_2:[2.0]})
print(var_res)
标签:数据 oba out on() tensor output inpu 指定 code
原文地址:https://blog.51cto.com/5669384/2415634