我想用张量流做一个简单的任务。但是我遇到一个错误import numpy as npimport pandas as pdfv = tf.Variable(10.0,name="first_var")sv = tf.Variable(20.0,np.random.randn(),name="second_var")fvp = tf.placeholder("float32",name="first_fvp",shape=[])svp = tf.placeholder("float32",name="second_svp",shape=[])result = tf.Variable(0.0,name="output")result = np.multiply(fvp,svp)sess = tf.Session()sess.run(tf.global_variables_initializer())print(sess.run(result,feed_dict={fvp:fv,svp:sv}))错误=设置具有序列的数组元素。在这种情况下,我遇到了错误如果我用print(sess.run(result,feed_dict={fvp:5.0,svp:10.0}))我得到50.0的输出
添加回答
举报
0/150
提交
取消