tensorflow 准确率0.098问题

有可能是损失函数为0无法优化导致的

https://stackoverflow.com/questions/33712178/tensorflow-nan-bug?newreg=c7e31a867765444280ba3ca50b657a07

以交叉熵损失函数为例可以修改为

cross_entropy = -tf.reduce_sum(y*tf.log(tf.clip_by_value(y_pred, 1e-10, 1.0)))

猜你喜欢

转载自blog.csdn.net/jade07/article/details/85243605