neural network toolbox classify(net, x) function not working

2 ビュー (過去 30 日間)
Pierre Pook
Pierre Pook 2017 年 8 月 8 日
コメント済み: Drew Grant 2020 年 12 月 3 日
matlab classify(net,x) generating undefined
overtime i run classify(net,x) on a trained neural network i get this output
<undefined>
<undefined>
<undefined>
<undefined>
my neural network is convolutional neural network that is trying to classify cancer images. Im using nfold cross validation andntrying to measure accuracy of each fold. For my second fold works fine but my first fold is generating this weird output. Im training my network 5 time for 5-fold cross validation and getting accuracy average over those 5
here is my code :
convnet11Fold1 = trainNetwork(Train1,layers,options)
save convnet11Fold1
YPred1 = predict(convnet11Fold1,nfoldTest1)
YTest1 = classify(convnet11Fold1,nfoldTest1)
TTest1 = nfoldTest1.Labels
accuracy1 = sum(YTest1 == TTest1)/numel(TTest1)
accuracyTotal(end+1)= accuracy1
totalT(end+1)= numel(TTest1)
totalY(end+1)= numel(YTest1)
convnet11Fold2 = trainNetwork(Train2,layers,options)
save convnet11Fold2
YTest2 = classify(convnet11Fold2,nfoldTest2)
TTest2 = nfoldTest2.Labels
accuracy2 = sum(YTest2 == TTest2)/numel(TTest2)
accuracyTotal(end+1)= accuracy2
totalT(end+1)= numel(TTest2)
totalY(end+1)= numel(YTest2)
  2 件のコメント
hung ting
hung ting 2018 年 4 月 2 日
Having the same trouble. Any suggestions?
Drew Grant
Drew Grant 2020 年 12 月 3 日
Having the same problem too a year and a half later... help please!

サインインしてコメントする。

回答 (1 件)

Enrico Sanna
Enrico Sanna 2018 年 9 月 9 日
Having same problem on saved LSTM. Please help.

カテゴリ

Help Center および File ExchangeDeep Learning Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by