Discussion:
Memory exhasted and I'm a bit tired too.
(too old to reply)
f***@msn.com
2008-04-28 03:37:16 UTC
Permalink
OK, I downloaded GNU Octave and the MNIST software from
http://www.cs.toronto.edu/~hinton/MatlabForSciencePaper.html
I've never used either MATHLAB or GNU Octave so don't have a
feal for how these things should go.

After some chugging along I got this error:

error: memory exhausted or requested size too large for range of
Octave's index type -- execution of mnistdeepauto.m failed

Where can I find the max values for Octave's various data types?
It would be nice to know if this is a memory or virtual memory or
Octave limit so I know what to do.

Also, part of MNIST has these constructs:

D = load(['test' num2str(d) '.ascii'],'-ascii');
save(['test' num2str(d) '.mat'],'D','-mat');

The documentation at: http://www.gnu.org/software/octave/doc/interpreter/Simple-File-I_002fO.html#Simple-File-I_002fO

says the forms should be:

load ("-text", "file.txt", "a")
save ("-text", "file.txt", "a")

Is this an Octave vs MATHLAB difference?
http://www.mathworks.com/access/helpdesk/help/techdoc/index.html

give the syntax as

load
load filename
load filename X Y Z ...
load filename -regexp expr1 expr2 ...
load -ascii filename
load -mat filename
S = load('arg1', 'arg2', 'arg3', ...)

then gives the example:

load('myfile.dat', '-mat')

I don't get it. It looks like MATHLAB has overloaded the function,
letting one switch the order.

Sorry to introduce myself with silly questions.
David Bateman
2008-04-28 07:13:02 UTC
Permalink
Post by f***@msn.com
OK, I downloaded GNU Octave and the MNIST software from
http://www.cs.toronto.edu/~hinton/MatlabForSciencePaper.html
I've never used either MATHLAB or GNU Octave so don't have a
feal for how these things should go.
error: memory exhausted or requested size too large for range of
Octave's index type -- execution of mnistdeepauto.m failed
This a known issue with WIndows allocation of memory to an application
be default being insufficent and teh registry needing to be modified. I
don't remember the details as I'm not a windows user. Ask on
Post by f***@msn.com
Where can I find the max values for Octave's various data types?
realmax
realmin
intmax('uint16')

etc for example.
Post by f***@msn.com
It would be nice to know if this is a memory or virtual memory or
Octave limit so I know what to do.
"whos" tells you the list of all variables are there size so you can see
what memory is allocated.
Post by f***@msn.com
D = load(['test' num2str(d) '.ascii'],'-ascii');
save(['test' num2str(d) '.mat'],'D','-mat');
The documentation at: http://www.gnu.org/software/octave/doc/interpreter/Simple-File-I_002fO.html#Simple-File-I_002fO
load ("-text", "file.txt", "a")
save ("-text", "file.txt", "a")
Is this an Octave vs MATHLAB difference?
http://www.mathworks.com/access/helpdesk/help/techdoc/index.html
give the syntax as
load
load filename
load filename X Y Z ...
load filename -regexp expr1 expr2 ...
load -ascii filename
load -mat filename
S = load('arg1', 'arg2', 'arg3', ...)
load('myfile.dat', '-mat')
I don't get it. It looks like MATHLAB has overloaded the function,
letting one switch the order.
No they all should work

D.
Post by f***@msn.com
Sorry to introduce myself with silly questions.
f***@msn.com
2008-04-28 12:54:53 UTC
Permalink
Thanks
Post by David Bateman
Post by f***@msn.com
OK, I downloaded GNU Octave and the MNIST software from
http://www.cs.toronto.edu/~hinton/MatlabForSciencePaper.html
I've never used either MATHLAB or GNU Octave so don't have a
feal for how these things should go.
error: memory exhausted or requested size too large for range of
Octave's index type -- execution of mnistdeepauto.m failed
This a known issue with WIndows allocation of memory to an application
be default being insufficent and teh registry needing to be modified. I
don't remember the details as I'm not a windows user. Ask on
Thanks. I'll look for the registry settings for a few days then
contact
help if all else fails.
Post by David Bateman
Post by f***@msn.com
Where can I find the max values for Octave's various data types?
realmax
realmin
intmax('uint16')
etc for  example.
OK, I guess I'll learn what the types are and what the default types
are.

It looks like type is determined by context.
These variables are introduced in this way:

maxepoch=10; %In the Science paper we use maxepoch=50, but it works
just fine.
numhid=1000; numpen=500; numpen2=250; numopen=30;

I assumed they were signed integers even though there
was no sign on the integer. Sometimes I'm just too much
of a "just try it" kind of guy where reading the manual
is an afterthought.
Post by David Bateman
Post by f***@msn.com
It would be nice to know if this is a memory or virtual memory or
Octave limit so I know what to do.
"whos" tells you the list of all variables are there size so you can see
what memory is allocated.
The default class is a bit strange to me:

Prot Name Size Bytes Class
==== ==== ==== ===== =====
rwd maxepoch 1x1 8 double
rwd numhid 1x1 8 double

It look like the default is an 8 byte floating point array.
Interestingly I set numhid to a string after doing this and it
just changed the variable's type:

rwd numhid 1x7 7 char

Yikes. I'll have to be careful in this language.

This one confuses me:

rwd ans 0x0 0 double

It looks like ans is being reserved without taking any memory.
Post by David Bateman
Post by f***@msn.com
  D = load(['test' num2str(d) '.ascii'],'-ascii');
  save(['test' num2str(d) '.mat'],'D','-mat');
The documentation at:http://www.gnu.org/software/octave/doc/interpreter/Simple-File-I_002f...
  load ("-text", "file.txt", "a")
  save ("-text", "file.txt", "a")
Is this an Octave vs MATHLAB difference?
http://www.mathworks.com/access/helpdesk/help/techdoc/index.html
give the syntax as
  load
  load filename
  load filename X Y Z ...
  load filename -regexp expr1 expr2 ...
  load -ascii filename
  load -mat filename
  S = load('arg1', 'arg2', 'arg3', ...)
  load('myfile.dat', '-mat')
I don't get it.  It looks like MATHLAB has overloaded the function,
letting one switch the order.
No they all should work
Thanks again. By putting the flag up front I didn't get the error.
Post by David Bateman
Post by f***@msn.com
Sorry to introduce myself with silly questions.- Hide quoted text -
- Show quoted text -- Hide quoted text -
- Show quoted text -
Continue reading on narkive:
Loading...