Network gives NaN after 30k trainings?
See original GitHub issueWhat is wrong?
I am working on a neural network, which implements reinforcement learning to play tetris. At one point during the training process with the learning rate set to 0.3 the network after 30k trainings gives the result 0 and then goes to NaN. Tried to figure out why Nan, but can’t seem to.
Where does it happen?
During the training process, when running a network with:
50 - input neurons
700 - first hidden
200 - second hidden
1 - output
How do we replicate the issue?
Just run the network with the [700, 200] neurons and learning rate of 0.3.
How important is this (1-5)?
2
Expected behavior (i.e. solution)
It should give at least 0 if nothing else
Other Comments
The entire code is here https://github.com/PetarIvancevic/node-neural-tetris . The code is run with:
node index.js -g NUM_GAMES -n NAME_OF_FOLDER
Ou yeah…the network LEARNS how to play…but it gives NaN xD…just weird. The blocks are fixated to always be OBlocks for testing and comparison.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
NaN loss when training regression network - Stack Overflow
I was running into my loss function suddenly returning a nan after it go so far into the training process. I checked the...
Read more >Common Causes of NANs During Training
Common Causes of NANs During Training · Gradient blow up · Bad learning rate policy and params · Faulty Loss function · Faulty...
Read more >Cost function turning into nan after a certain number of iterations
Well, if you get NaN values in your cost function, it means that the input is outside of the function domain. E.g. the...
Read more >SVI: nans from guide when Trace_ELBO drops
During training, I'm getting nans when the loss drops. lr=1e-6 svi ... The neural net returns NaNs in every element of the tensor....
Read more >PYTHON : NaN loss when training regression network
PYTHON : NaN loss when training regression network [ Gift : Animated Search Engine : https://www.hows.tech/p/recommended.html ] PYTHON : NaN ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sure, will do some testing.
You should “play” around 30k games, then it breaks. My latest guess is that it might be somehow node related, but I have no idea how 😕