Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

训练时,loss全是nan,请问是什么原因呢? #4

Open
cuglaiyp opened this issue Nov 17, 2022 · 3 comments
Open

训练时,loss全是nan,请问是什么原因呢? #4

cuglaiyp opened this issue Nov 17, 2022 · 3 comments

Comments

@cuglaiyp
Copy link

No description provided.

@An-Yuhang-ace
Copy link
Owner

您好,应该是梯度爆炸的问题,建议先把seq2seq模型的encoder_length和decoder_length调小,预训练之后把参数存下来后继续训练长步长的模型。

@cuglaiyp
Copy link
Author

您好,应该是梯度爆炸的问题,建议先把seq2seq模型的encoder_length和decoder_length调小,预训练之后把参数存下来后继续训练长步长的模型。

明白了,谢谢您!

@cuglaiyp
Copy link
Author

您好,应该是梯度爆炸的问题,建议先把seq2seq模型的encoder_length和decoder_length调小,预训练之后把参数存下来后继续训练长步长的模型。

还有一个问题想请教一下,在TestVisual中,预测完,对预测值进行反差分时,lng0和lat0用lng_source[len(lng_source) - 1] 和 lat_source[len(lat_source) - 1]是否要合理一些?如下所示:

    # delta_lng, delta_lat to lng, lat
    lng0 = lng_source[len(lng_source) - 1]
    lat0 = lat_source[len(lat_source) - 1]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants