【发布时间】:2017-05-27 16:18:28
【问题描述】:
#file for inputing the data for testing
from scipy import ndimage
image_file='test.png'
image_data = ndimage.imread(image_file).astype(float)
image_data = image_data.reshape((-1, image_size * image_size)).astype(np.float32)
rst = tf.Graph()
with rst.as_default():
result = tf.matmul(image_data, weights) + biases
picko=tf.nn.softmax(result)
with tf.Session(graph=rst) as rsts:
tf.global_variables_initializer().run()
predictions = rsts.run([picko])
运行上述代码时出现以下错误。请建议我一个我无法手动解决的解决方案。
ValueError: Fetch 参数不能解释为张量。 (Tensor Tensor("Softmax_4:0", shape=(1, 10), dtype=float32) 不是这个图的元素。)
【问题讨论】:
标签: tensorflow