import tensorflow.compat.v1 as tf
tf.disable_eager_execution()
input1=tf.placeholder(tf.float32)#还可以指定维度,tf.placeholder(tf.float32,[2,2])指定传入2行2列的数据
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]}))