TensorFlow: loss jumps up after restoring RNN net

后端 未结 1 562
深忆病人
深忆病人 2021-01-07 07:24

Environment info

  • Operating System: Windows 7 64-bit
  • Tensorflow installed from pre-built pip (no CUDA): 1.0.1
  • Python 3.5.2 64-bit
1条回答
  •  清酒与你
    2021-01-07 07:31

    The problem is solved. It had nothing to do with RNN nor TensorFlow.

    I changed

    chars = list(set(data))
    

    to

    chars = sorted(set(data))
    

    and now it works.

    This is because python uses a random hash function to build the set, and every time python restarted, 'chars' had a different ordering.

    0 讨论(0)
提交回复
热议问题