【发布时间】:2018-01-04 21:21:54
【问题描述】:
我正在尝试扩展 MNIST Tensorflow 教程“专家深度学习”,我正在尝试打印 y_conv 的最终值(来自教程),这是我的代码:
with sess.as_default():
x_test=mnist.test.images[10]
x_test=np.reshape(x_test,(-1,784))
print(y_conv.eval(feed_dict={x:x_test,keep_prob:1}))
print (accuracy.eval(feed_dict={x: np.reshape(mnist.test.images[10],-1,784)
我得到了一个奇怪的 y_conv 值:
[[ 18.27762222 -3.28520679 2.48342848 -4.64049053 -6.00347185
-4.08683825 -1.80674195 -2.16284728 -4.48559856 1.90175676]]
虽然当我在最后一行打印精度时,我得到的值为 1.0,这意味着 y_conv 与 y 的值匹配(再次来自教程。) 关于可能出现什么问题的任何想法..?
【问题讨论】:
-
你为什么说它很奇怪?
y_conv似乎没有应用softmax。
标签: python tensorflow mnist