tensorflow的cross_entropy(loss)=nan问题
tensorflow
一个面向所有人的开源机器学习框架
项目地址:https://gitcode.com/gh_mirrors/te/tensorflow
·
解决方案1:
cross_entropy = -tf.reduce_sum(y_*tf.log(tf.clip_by_value(y_conv,1e-10,1.0)))
解决方案2:(推荐)
cross_entropy = -tf.reduce_sum(y_*tf.log(y_conv + 1e-10))
原文参考:http://stackoverflow.com/questions/33712178/tensorflow-nan-bug
解释参考:http://blog.csdn.net/sinat_16823063/article/details/53699849
一个面向所有人的开源机器学习框架
最近提交(Master分支:1 个月前 )
4f64a3d5
Instead, check for this case in `ResolveUsers` and `ResolveOperand`, by querying whether the `fused_expression_root` is part of the `HloFusionAdaptor`.
This prevents us from stepping into nested fusions.
PiperOrigin-RevId: 724311958
1 个月前
aa7e952e
Fix a bug in handling negative strides, and add a test case that exposes it.
We can have negative strides that are not just -1, e.g. with a combining
reshape.
PiperOrigin-RevId: 724293790
1 个月前
更多推荐




所有评论(0)