Out of memory for Probabilistic Neural Network in Matlab

1 view (last 30 days)
Hi all,
I am facing a problem while running an ANN code in matlab . The code and the error massage is as follows:
>> p=load('train.dat')'; >> Tc=eye(11647); >> spread=(0.5); >> net=newpnn(p,Tc,spread); ??? Error using ==> vertcat Out of memory. Type HELP MEMORY for your options.
Error in ==> network.subsasgn>resizem at 2202 m = [m; zeros(r-R,C)];
Error in ==> network.subsasgn>setLayerSize at 1217 net.LW{i,j} = resizem(net.LW{i,j},lwSize);
Error in ==> network.subsasgn at 179 [net,err] = setLayerSize(net,i,newSize);
Error in ==> newpnn at 97 net.layers{2}.size = S;
I appreciate any help.
Cheers

Accepted Answer

Walter Roberson
Walter Roberson on 21 Jun 2011
eye(11647) requires just a little more than 1 gigabyte of memory, and the ANN code needs to create another matrix of roughly the same size to write in to the layers of the NN being constructed.
You are simply running out of memory. You would be better off switching to the 64 bit MATLAB and installing more memory.
  2 Comments
mahdi bazarghan
mahdi bazarghan on 22 Jun 2011
Dear Walter,
Thanks for the prompt reply.
Unfortunately, my system is 32 bit Processor. Does it help if I install the 64 bit Matlab instead of 32 bit? You mean, I need to add another RAM memory to my PC?
Cheers
Walter Roberson
Walter Roberson on 22 Jun 2011
The 64 bit MATLAB version cannot be run on a 32 bit processor.
If you already have 4 Gb or more of combined RAM and swap space, then adding more RAM to your system might make it faster but would not change whether it would be able to solve the problem.
You are trying to solve a problem that is too large for your equipment. You will need to reduce size of the problem.

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!