Hello,
Currently I am using Matlab R2010b Neural Network Toolbox.
I am trying to train elman network for binary time series prediction. Specifically I would like to do incremental training (adapt) technique by means of function adaptwb. My input is binary sequences in cell arrays format, and I expect the elman net can predict one step ahead binary output.
However, it always failed to calculate the gradient of bias, input weights, and layer weights as follows:
>> P = [0 0 0 0 0 1 1 1 1]; T = [P(2:end) P(1)];>> P = con2seq(P); % input seq
>> T = con2seq(T); % output seq - 1 ts lead version of input seq
>> net = layrecnet(1:1, 10);% elman net 1 lyr delay, 10 hdn nodes
>> [Ps, Pi, Ai, Ts] = preparets(net, P, T);>> [net, Y, E, Pf, Af] = adapt(net, Ps, Ts, Pi, Ai);??? Index exceeds matrix dimensions.Error in ==> C:\ProgramFiles\MATLAB\R2010b\toolbox\nnet\nnutils\+nnprop\grad.p>grad at 187Error in ==> adaptwb>adapt_network at 96 [gB,gIW,gLW] = nnprop.grad(net,Q,PD(:,:,ts),BZ,IWZ,LWZ,N,Ac(:,ts+AcInd),gE,1,TS,fcns);Error in ==> adaptwb at 39 [out1,out2,out3] = adapt_network(in1,in2,in3,in4);Error in ==> network.adapt at 122[net,Ac,tr] = feval(adaptFcn,net,Pd,T,Ai);>>
Could you please tell me what is the correct procedure to do such incremental training? Thank you for your help.
Best Answer