out of memory while training pattern recognition neural network

Asked by Khalid Tobji on 10 Jul 2012
Latest activity Commented on by Greg Heath on 21 Jul 2012

Hi all, I am using MATLAB Version: 7.14.0.739 (R2012a) Neural Network Toolbox Version 7.0.3 (R2012a)

I am using the pattern recognition nn

  • input is 315x5400
  • output is 6x5400
  • 1 hiddenlayer is 1500

my PC has 32 GB, using Windows 7 64 bit, with page file 32 GB

when using the supplied GUI interface to training the network, everything works fine. then when I use the same GUI to generate the script after this, then try to run the script with the same configuration used during GUI training I get the following error:

************************************************************************* % Train the Network [net,tr] = train(net,inputs,targets); 46 [net,tr] = train(net,inputs,targets); Out of memory. Type HELP MEMORY for your options.

Error in C:\Program Files\MATLAB\R2012a\toolbox\nnet\nnutils\+nnprop\jac_s.p>reprowint (line 354)

Error in C:\Program Files\MATLAB\R2012a\toolbox\nnet\nnutils\+nnprop\jac_s.p>jac_s (line 244)

Error in staticderiv>calc_jacobian (line 222) jWB = nnprop.jac_s(net,data.P,data.Pd,data.Zb,data.Zi,data.Zl,...

Error in staticderiv (line 85) out1 = calc_jacobian(in2,in3,in4);

Error in defaultderiv>calc_jacobian (line 217) jWB = staticderiv('jacobian',net,data,fcns);

Error in nntraining.perfs_jejj>calc_Y_trainPerfJeJJ (line 87) Jwb_y = fcns.deriv.calc_jacobian(net,signals,fcns);

Error in nntraining.perfs_jejj>singlecalc (line 58) [Y,trainPerfy,trainN,JEy,JJy] = calc_Y_trainPerfJeJJ(net,data,fcns);

Error in nntraining.perfs_jejj (line 9) [trainPerfy,trainN,valPerfy,~,testPerfy,~,JEy,JJy] = singlecalc(net,data,fcns);

Error in trainlm>train_network (line 199) [perf,vperf,tperf,je,jj,gradient] = nntraining.perfs_jejj(net,data,fcns);

Error in trainlm (line 113) [net,tr] = train_network(net,tr,data,fcns,param);

Error in network/train (line 106) [net,tr] = feval(net.trainFcn,net,X,T,Xi,Ai,EW,net.trainParam);

Error in autoscript2400 (line 46) [net,tr] = train(net,inputs,targets);

*********************************************************************

your help is really appreciated and looking forward to hearing from you. let me know if you need any further information.

3 Comments

Greg Heath on 18 Jul 2012

You mean further information like

1. Which network?

2. Size of input and output matrices?

3. Did you consult

help trainlm

doc trainlm

w.r.t. memory problems?

Khalid Tobji on 20 Jul 2012

Hi Greg I am using the pattern recognition nn

input is 315x5400

output is 6x5400

1 hiddenlayer is 1500

my PC has 32 GB, using Windows 7 64 bit, with page file 32 GB

I have tried to consult many sources but nothing so far. I am new in Matlab NN toolbox so I appreciate your help

Greg Heath on 21 Jul 2012

Please answer questions 1 & 3.

Khalid Tobji

0 Answers

Contact us