美文网首页
pytorch problems

pytorch problems

作者: 啊啊啊啊啊1231 | 来源:发表于2020-10-02 16:47 被阅读0次

    1. nan loss

    It's a natural property of stochastic gradient descent, if the learning rate is too large, SGD can diverge into infinity.

    Solution: 1) reduce learning rate

    2) normalization helped

    3) The solution for me was using tf.losses.sparse_softmax_cross_entropy(y, logits) instead of my own implementation of Safe Softmax using tf.nn.Softmax

    相关文章

      网友评论

          本文标题:pytorch problems

          本文链接:https://www.haomeiwen.com/subject/aiibuktx.html