ConvNet:验证损失没有明显下降,但准确性正在提高
ConvNet : Validation Loss not strongly decreasing but accuracy is improving
使用 TensorFlow
我构建了一个简单的 CNN
进行分类。它具有以下定义:
Input Tensor : 32,32,1 Grayscale Image
1 Conv Layer 3x3x32
Relu Activated
2x2 Max Pooled
128 FC1
43 FC2 # 43 classes
可以在此找到完整代码notebook on github
validation loss
和 accuracy
在 Epochs
100, 1000, 2000 人
epoch 100 validation loss 3.67, validation accuracy 12.05%
epoch 1000 validation loss 3.234, validation accuracy 57.63%
epoch 2750 validation loss 3.111, validation accuracy 69.25%
除非我误解或某处有错误,否则网络正在学习。然而,验证损失仅略有下降。
这是什么意思?我如何使用这些信息来改进网络?
这是 TensorFlow 中的一个典型错误:您不应该在输出上应用 softmax 然后 tf.nn.softmax_cross_entropy_with_logits
。
操作tf.nn.softmax_cross_entropy_with_logits
需要未缩放的logits(即没有softmax)。来自 documentation:
WARNING: This op expects unscaled logits, since it performs a softmax on logits internally for efficiency. Do not call this op with the output of softmax, as it will produce incorrect results.
使用 TensorFlow
我构建了一个简单的 CNN
进行分类。它具有以下定义:
Input Tensor : 32,32,1 Grayscale Image
1 Conv Layer 3x3x32
Relu Activated
2x2 Max Pooled
128 FC1
43 FC2 # 43 classes
可以在此找到完整代码notebook on github
validation loss
和 accuracy
在 Epochs
100, 1000, 2000 人
epoch 100 validation loss 3.67, validation accuracy 12.05%
epoch 1000 validation loss 3.234, validation accuracy 57.63%
epoch 2750 validation loss 3.111, validation accuracy 69.25%
除非我误解或某处有错误,否则网络正在学习。然而,验证损失仅略有下降。
这是什么意思?我如何使用这些信息来改进网络?
这是 TensorFlow 中的一个典型错误:您不应该在输出上应用 softmax 然后 tf.nn.softmax_cross_entropy_with_logits
。
操作tf.nn.softmax_cross_entropy_with_logits
需要未缩放的logits(即没有softmax)。来自 documentation:
WARNING: This op expects unscaled logits, since it performs a softmax on logits internally for efficiency. Do not call this op with the output of softmax, as it will produce incorrect results.