Using tf.convert_to_tensor() to input data is convenient but it doesn't scale. Use tf.placeholder variables (dummy nodes that provide entry points for data to a computational graph). A feed_dict is a Python dictionary mapping:
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:[5.], input2:[6.]}))
The preceding code gives this output:
[array([ 30.], dtype=float32)]