training stops due to NaN loss value

The training process stops due NaN loss... How to avoid this to complete the training ..and what is the possible issue that causses..

5 Commenti

Likely you have some nan data in your training samples. You can try
rmmissing(A, dim)
the data do not have any "Nan" value
Then what is the loss function?
Weighted cross entropy loss
try "dbstop error" and then run the program. Check if the network output is 0. There might be a problem if network output is 0 since entropy loss has term of T*log(Y) where T is target and Y is the network output.

Accedi per commentare.

Risposte (1)

Shoaib Ali
Shoaib Ali il 24 Ago 2022
Can you explain, where to use this inside the loss funtion or before the training command??

2 Commenti

"dbstop error" can be used in command line before you train the network. Then it should stop when error occurs and then you check out what is wrong at which part of program.
ok Thanks

Accedi per commentare.

Categorie

Scopri di più su Deep Learning Toolbox in Centro assistenza e File Exchange

Richiesto:

il 22 Ago 2022

Commentato:

il 26 Ago 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by