Problem in training the feed-forward network.
Afficher commentaires plus anciens
Using 'simout' options in my simulink model, I saved the input and output data in workspace, which were then called in my program. The input and output are matrix of dimensions "3988*1 double"
My MATLAB program is as follows:
------------
load input
load output
p=input';
t=output';
net=newff(10,30, [10,1], {'tansig', 'purelin'}, 'traingd')
net.trainParam.show=50;
net.trainParam.epochs=1000;
net.trainParam.lr=0.05;
net.trainParam.goal=1e-3;
net1=train(net,p,t)
-----------------
Everytime I run this program, the following error is generated.
??? Error using ==> plus
Matrix dimensions must agree.
Error in ==> calcperf2 at 163
N{i,ts} = N{i,ts} + Z{k};
Error in ==> trainlm at 253
[perf,El,trainV.Y,Ac,N,Zb,Zi,Zl]= calcperf2(net,X,trainV.Pd,trainV.Tl,trainV.Ai,Q,TS);
Error in ==> network.train at 216
[net,tr] = feval(net.trainFcn,net,tr,trainV,valV,testV);
Error in ==> Ann1 at 16
net1=train(net,p,t);
>>
-----
But I don't understand, How to debug it. Kindly help.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Deep Learning Toolbox dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!