keras-team / keras

Deep Learning for humans
http://keras.io/
Apache License 2.0
61.91k stars 19.45k forks source link

Loss increases after re-importing weights #12834

Closed wmylxmj closed 5 years ago

wmylxmj commented 5 years ago

I trained a model(conv1d neural network), and use function 'model. save_weights ()' to save my weights. But when I re-import weights using function 'model. load_weights()',losses suddenly increase on the same data set (much better than random initialization, but much worse than the training just done). That seems to be adding some random noise to the trained weights. And the sudden increase of the loss value will rapidly decline. The same problem has been encountered in training LSTM before. It looks strange,and it will affect my performance on the test set. what should I do to solve the problem?

wmylxmj commented 5 years ago

I know the answer.

palatos commented 5 years ago

Could you explain how you solved it? I've been having the same issue.