what is causes NaN values in the validation accuracy and loss from traning convolutional neural network and how to avoid it?
古いコメントを表示
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

3 件のコメント
Santosh Gnanasekaran
2018 年 1 月 1 日
編集済み: Santosh Gnanasekaran
2018 年 1 月 1 日
If the number\values are not properly represented or in case if you have any space at the beginning of the value the system recognizes thats nan.
1. Please ensure that there is no space at the beginning of the number\value.
2. Please ensure that there is no special character at number\value entered.
Salma Hassan
2018 年 1 月 1 日
Javier Pinzón
2018 年 1 月 29 日
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
回答 (3 件)
Ignacio Arganda-Carreras
2018 年 10 月 17 日
1 投票
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.
aybike pirol elmas
2020 年 6 月 23 日
1 投票
Merhaba,
Ben de bu problemi yaşadım.
'ValidationFrequency' 1 olarak yazdığımda, ... sorun kayboldu. Artık NAN değeri yok.
1 件のコメント
Ismail Cem Tüzün
2023 年 2 月 20 日
Deneyeceğim, teşekkürler
mohammed mahmoud
2020 年 6 月 24 日
1 投票
The main problem is the vanishing gradient. It can be solved with adjust suitable learning rate value
カテゴリ
ヘルプ センター および File Exchange で Tuning についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!