im遵循MNIST Softmax教程https://www.tensorflow.org/tutorials/mnist/beginners/
在文档后面,模型应该是
y = tf.nn.softmax(tf.matmul(x, W) + b)但在示例源代码中,如您所见
# Create the model
x = tf.placeholder(tf.float32, [None, 784])
W = tf.Variable(tf.zeros([784, 10]))
b = tf.Variable(tf.zeros([10]))
y = tf.matmul(x, W) + b未使用softmax。我认为它需要改变
y = tf.nn.softmax(tf.matmul(x, W) + b)我假设,在测试函数中,它使用argmax,因此不需要将其归一化为0~1.0值。但它可能会给开发人员带来一些困惑。
关于这个的想法?
https://stackoverflow.com/questions/41340879
复制相似问题