views:

66

answers:

2

I have a problem which occurs when I write the command line of the rbf (radial basis function) neural network

net = newrb(T, D);

I get the error

**??? Error using ==> unknown
Out of memory. Type HELP MEMORY for your options.

Error in ==> dist>apply at 119
z = zeros(S,Q);

Error in ==> boiler_weight at 38
result = apply(a,b,c);

Error in ==> dist at 90
boiler_weight

Error in ==> newrb>designrb at 143
P = radbas(dist(p',p)*b);

Error in ==> newrb at 127
[w1,b1,w2,b2,tr] = designrb(p,t,goal,spread,mn,df);**

I'm working with 2 GB RAM Virtual Memory Initial size 4 GB & Maximum size 8 GB

I tried

  • Maximizing the virtual memory
  • Under Windows XP x32, I managed to almost double the amount of memory available to Matlab by editing boot.ini to add the switch /3GB /USERVA=3030 /fastdetect /3GB /USERVA=3030
  • pack (for memory defragmentation)

but all this with no use

Any help please ?!!!!!!

Thanx in advance

+2  A: 

I don't have a fix, but here are some debugging techniques for OOMs in Matlab that seem germane.

Pack doesn't work nearly as well as its doco says it does. If memory is fragmented at a low level (not uncommon), you must restart Matlab to fix it. "Memory" and "feature memstats" will give some indication of low level fragmentation. Try restarting and running from a fresh Matlab session to see if it's fragmentation, or it's really peak memory usage.

Try a "dbstop if all error" so you break in to the debugger when you run out of memory. Then you can examine the stack frames with dbup and dbdown to see what's holding down memory, and see if there are any surprisingly large arrays. OOMs are sometimes from miscomputed indexes or array sizes that end up allocating extra-big arrays.

The undocumented "profile on -memory" option can tell you about memory usage during execution, which may help.

And your data set might just be too big. See if you can break it in to smaller parts and loop over them, reducing peak memory requirements.

Good luck.

Andrew Janke
A: 

Maybe one of the solutions offered by The MathWorks solves your issue:

http://www.mathworks.com/support/tech-notes/1100/1107.html

zellus

related questions