Validation Error with trainbr is NaN

1 回表示 (過去 30 日間)
gsourop
gsourop 2017 年 3 月 24 日
回答済み: nazanin abz 2017 年 6 月 19 日
Hi everyone,
I would like to ask why do I get a vector of NaN values to the MSEval below when I apply the trainbr algorithm. However, when I apply the trainlm algorithm I get actual values.
a=randn(1,1000);
b= randn ( 1, 1000);
hiddenLayerSize= 1 ;
net = fitnet(hiddenLayerSize);
net.divideFcn = 'divideblock';
net.divideParam.trainRatio = 70/100;
net.divideParam.valRatio = 30/100;
net.divideParam.testRatio = 0/100;
net.trainFcn = 'trainbr';
net.trainParam.showWindow=false;
[net,tr] = train(net,a ,b);
outputs = net(a);
MSEval = tr.vperf
Thanks in advance.

回答 (1 件)

nazanin abz
nazanin abz 2017 年 6 月 19 日
it's not there by default anymore, you can use this command if you really need it. net.trainParam.max_fail = 6 However it's being said it's not necessary.

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by