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

tools中clip的问题 #13

Closed
cyzhangAThit opened this issue Nov 24, 2017 · 1 comment
Closed

tools中clip的问题 #13

cyzhangAThit opened this issue Nov 24, 2017 · 1 comment

Comments

@cyzhangAThit
Copy link

Hi,
我之前曾经问过一个训练生成对话模型(机器翻译模型未做实验)过程中经常会遇到"NaN"的问题,之前获得的建议是调整学习率,我试过很多次,但仍然会出现这种情况。我最近发现在tools.py中的clip函数中,只处理了NaN的情况,而实际发现,梯度更多的是先出现Inf的情况,进而会导致cost出现NaN的情况。而加入Inf的处理后,"NaN"的情况目前就没有出现过了。不知道这种解决方案是否是对的?

@Glaceon31
Copy link
Collaborator

我们也发现即使处理了NAN的情况偶尔还是会有cost出现NAN的现象。你的方案应该是对的,如果有机会的话我们也会尝试一下,谢谢!

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