-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Problems with automatic_optimization=False #4295
Comments
Hi! thanks for your contribution!, great first issue! |
I discovered this because the loss was showing up as |
Hi @catalys1, in
in my case, no more nan when |
I am having the same issue, but I am also trying to add to the progress bar other logging scalars which are not showing at all. As for printing the loss, @GregorySenay comment worked for me!
|
🐛 Bug
When
automatic_optimization = False
andterminate_on_nan = True
, an exception is raised when checking fornan
values. This is due toNone
being passed in as the value forloss
toself.detect_nan_tensors
. It looks like the code on master has already changed from what I'm seeing in1.0.3
, so I don't know if this has somehow been fixed or not. The problem seems to be that theAttributeDict
returned fromtrain_step
hasloss=None
.Please reproduce using the BoringModel and post here
https://colab.research.google.com/drive/1qQmP6BwQk--rBXC7W45y0mn6QK39IPcc
Expected behavior
Don't crash when
automatic_optimization = False
andterminate_on_nan = True
The text was updated successfully, but these errors were encountered: