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

Traning and testing losses return 'nan' during training #5

Closed
DataExMachina opened this issue Apr 23, 2020 · 2 comments
Closed

Traning and testing losses return 'nan' during training #5

DataExMachina opened this issue Apr 23, 2020 · 2 comments

Comments

@DataExMachina
Copy link

Hi all,

First of all thank you for your amazing job on ES-RNN pytorch implementation.
I have been able to run the M4 scripts, but I encountered troubles trying to run ESRNN architecture on an another data source.

I am trying to apply this model on the M5 competition. The input is the following tables:
image

I define the model as following (taking some parameters from the initial config dict) and use previously defined tables to train it:
image

But I observe that the network does not seem to learn, because of 'nan' returned during training. Is there something I missed ?

@cchallu
Copy link
Collaborator

cchallu commented Apr 23, 2020

Hi,

Thanks for using our implementation. For what I can see in the data there are multiple zeros in the target variable. The model will return nan losses if the target variable of any serie has zero in the first ds (since the model normalizes the series by previous values). Can you try adding 1 (or any scalar) to all the target variable for all ds? You can then substract the scalar to the predictions.

@DataExMachina
Copy link
Author

Hi !

Thanks a lot, it works !

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