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

Gradient overflow (NaN problem) #2

Closed
CODEJIN opened this issue Sep 10, 2020 · 2 comments
Closed

Gradient overflow (NaN problem) #2

CODEJIN opened this issue Sep 10, 2020 · 2 comments

Comments

@CODEJIN
Copy link

CODEJIN commented Sep 10, 2020

Hi,

Thank you for your code! And, I have a question. I am trying to apply power normalization(PN) to Tacotron2. However, after I changed batch norm(BN) to PN, an overflow occurred after several thousands step training. When I checked, the MaskPowerNorm class's ema_gz parameter was smaller and smaller while training, and finally it became NaN. Is there any opinion or solution?

Thanks,

Heejo

@sIncerass
Copy link
Owner

Hi, thanks for your interest and sorry for the late reply. I would suggest to tune the \alpha_bkw parameter in the https://github.com/amirgholami/powernorm/blob/2f23ae75c4f29904175bfd2c6b8248399ff99440/fairseq/modules/norms/mask_powernorm.py#L103. The larger it is, the smaller variance it will introduce to the later training phase.

@CODEJIN
Copy link
Author

CODEJIN commented Sep 16, 2020

Hi, thank you for your reply. However, the link you sent is not work for me. I saw Page not found...

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