what is causes NaN values in the validation accuracy and loss from traning convolutional neural network and how to avoid it?
11 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I USE this line in matlab code [trainedNet,traininfo] = trainNetwork(trainMatrix,Layers,opts);
so the information about validation and traning accuracy/loss are storage in the variable traininfo.. when i open this variable i found only the first value in iteration number 1 and also the last value but between them the value are NAN. how to avoid this problem you know i need the whole values for plotting the learning curve after that
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/168342/image.png)
3 Commenti
Javier Pinzón
il 29 Gen 2018
Hello As Has,
Sorry for the late response, but, with the info provide is very difficult to find what is the root of the problem, may you provide us the next information?:
- Definition of the layers declared
- Network Options declared
At the moment that information. In that way, we can find what causes the problem.
Best Regards
Javier
Risposte (3)
Ignacio Arganda-Carreras
il 17 Ott 2018
Hello As Has,
I found the answer in the documentation of trainingInfo : "Each field is a numeric vector with one element per training iteration. Values that have not been calculated at a specific iteration are represented by NaN." So you need to check the iterations multiple of your validation frequency, those should have a value different from NaN.
0 Commenti
aybike pirol elmas
il 23 Giu 2020
Merhaba,
Ben de bu problemi yaşadım.
'ValidationFrequency' 1 olarak yazdığımda, ... sorun kayboldu. Artık NAN değeri yok.
mohammed mahmoud
il 24 Giu 2020
The main problem is the vanishing gradient. It can be solved with adjust suitable learning rate value
0 Commenti
Vedere anche
Categorie
Scopri di più su Image Data Workflows in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!