-
Notifications
You must be signed in to change notification settings - Fork 163
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
NaN values in gradients #29
Comments
Hi, getting no gradient for Getting NaN in gradient is natural especially at the beginning of the training. We are using mixed precision which means that most operations are cast to FP16. Because of the lower precision, we may get NaN easily and it's You can disable mixed-precision by supplying Line 163 in 38eb997
|
Hi, in my experiment, I used Moving-MNIST dataset. But here are my problems during training that I couldn't find an answer:
I tried to play with a small network by using only num_latent_scale=1 and num_groups_per_scale=1. Then I realized there were no gradients generated for parameters including prior.ftr0 and an error was given to stop the training.
If I increase num_groups_per_scale from 1 to 2 or more, I still got Nan in some of the gradients in the first iteration, then they went away, but the training continues without errors.
I'm wondering if you could provide some hint or clue to why such behavior happens? Thank you in advance!
The text was updated successfully, but these errors were encountered: