I did the example follow the Neural Network Use's guide 2012b on page 1-35,After entering the code which are follow:
net = linearlayer([0 1],0.02);net.inputs{1}.size = 1;net.layers{1}.dimensions = 1;net.IW{1,1} = [0 0];net.biasConnect = 0;net.trainParam.epochs = 1;Pi = {1};P = {2 3 4};T = {3 5 6};net = train(net,P,T,Pi);
I got the result:
Index exceeds matrix dimensions.Error in trainb>train_network (line 206) [dw,IWLS{i,j}] = learnFcn.apply(net.IW{i,j}, ...Error in trainb (line 55) [out1,out2] = train_network(varargin{2:end});Error in network/train (line 274) [net,tr] = feval(net.trainFcn,'apply',net,tr,data,hints,net.trainParam);
Who can explain this situation for me ? Are the command codes on the user's guide book wrong? How can I fix the problem?
Best Answer