Why do I get a dimension mismatch error when training my neural network using constant input data in Neural Network Toolbox 6.0 (R2008a)?
Show older comments
There are 2 datasets in the attached MAT files : data1.mat , data2.mat. Creating and training the network using the first dataset works fine, however using the second dataset (containing constant inputs) leads to an error:
??? 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 219
[net,tr] = feval(net.trainFcn,net,tr,trainV,valV,testV);
Error in ==> netztraining at 63
Netz = train(Netz,[p;t],t,pi);
To reproduce this behavior, run the attached sample script 'nettraining.m' after loading one of the MAT files.
Accepted Answer
More Answers (0)
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!