2010/4/8 [email protected] <[email protected]>
> Hi Stefan,
>
> You're not the first who is writing this.
> Now, I was in holiday last week, so I could not check, what
> changed.
>
> Please write which version of octave you are using and also on which OS,
> this would help.
>
> I can tell you,
> that with octave-version 3.0.0 everything was ok.
> I can't test it on a newer version, because I can't compile the newer
> ones
> on ubuntu, I couldn't figure out the problem.
>
> so if possible, downgrade to octave-3.0.0.
> As soon as octave
> version 3.2.4 is working on my system, I will correct this problem.
>
Hi Michael,
seems to happen with different combinations of octave-versions and OS
lets start with an unrelated error on ubuntu 9.10 and octave 3.2.3, using
the example from 'help newff' :
PC$ octave
GNU Octave, version 3.2.3
Octave was configured for "i486-pc-linux-gnu".
octave:2> Pr = [0.1 0.8; 0.1 0.75; 0.01 0.8];
octave:3> net = newff(Pr, [4 1], {"tansig","purelin"}, "trainlm",
"learngdm", "mse");
error:
error: called from:
error: /usr/share/octave/packages/3.2/nnet-0.1.10/newff.m at line 65,
column 1
This I believe is an error in octave, not the nnet package. I found some
comment on that on the internet, unfortunately I forgot where. This error
disappears when you use octave 3.2.4
Now the same PC with octave 3.2.4 which was compiled from source. (Luckily I
had not yet done 'make install')
PC# octave
GNU Octave, version 3.2.4
Octave was configured for "i686-pc-linux-gnu".
octave:2> Pr = [0.1 0.8; 0.1 0.75; 0.01 0.8];
octave:3> net = newff(Pr, [4 1], {"tansig","purelin"}, "trainlm",
"learngdm", "mse");
# 2-layer OK
octave:4> net = newff(Pr, [4 4 1], {"tansig","tansig","purelin"}, "trainlm",
"learngdm", "mse");
error: invalid assignment to cs-list outside multiple assignment.
error: assignment to cell array failed
error: assignment to structure element failed
error: assignment failed, or no method for `struct = null_matrix'
error: called from:
error: /usr/local/share/octave/packages/nnet-0.1.10/newff.m at line 111,
column 22
#3-layer: Not OK
The same happened on windows with octave 3.2.4 (the newest binary on
octave-forge)
This error disappears with the following change to
/usr/local/share/octave/packages/nnet-0.1.10/newff.m, line 110:
## set more needed empty cells
for L=2:nLayers
net.IW{L,1} = [];
end
# original code: net.IW{2:nLayers,1} = [];
After the change it looks like this:
PC# octave
GNU Octave, version 3.2.4
Octave was configured for "i686-pc-linux-gnu".
octave:1> Pr = [0.1 0.8; 0.1 0.75; 0.01 0.8];
octave:2> net = newff(Pr, [4 1], {"tansig","purelin"}, "trainlm",
"learngdm", "mse");
octave:3> net = newff(Pr, [4 4 1], {"tansig","tansig","purelin"}, "trainlm",
"learngdm", "mse");
No error. I am not sure if that is the correct solution but at least it
appears to work.
Stefan
>
> Michael
>
> ----Ursprüngliche Nachricht----
> Von:
> [email protected]
> Datum: 03.04.2010 19:14
> An: <[email protected]>
> Betreff: [OctDev] NNET: Problem with newff() if
> more that 2 layers
>
> Hi all,
>
> a 2-layer nnet can be defined, but 3 layers produces an error. See example
> below.
> Any
> hints on what I missed?
>
> The problem can be "fixed" by modifying line 110 of newff.m like this :
> original: net.IW{2:
> nLayers,1} = [];
> "fixed": net.IW{2:2,1} = [];
>
> That is probably not the way it was intended.
>
> THX
> Stefan
>
> --- script
> ---
> RANGE =
>
> -4 4
> -4 4
> -4 4
> -4 4
>
> # 2-
> layer is OK:
> octave.exe:24> net = newff(RANGE , [3 1] , {"tansig" , "tansig"} ) ;
>
> # 3-layers = Error
> octave.exe:25>
> net = newff(RANGE , [3 3 1] , {"tansig" , "tansig" ,
> "tansig"} ) ;
> error: invalid assignment to cs-list outside
> multiple assignment.
> error: assignment to cell array failed
> error: assignment to structure element failed
> error:
> assignment failed, or no method for `struct = null_matrix'
> error: called from:
> error: C:\octave\3.2.4_gcc-4.4.0\
>
> share\octave\packages\nnet-0.1.10\newff.m at line 110, column 22
>
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio
> Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for
> parallel performance.
> See why Intel Parallel Studio got high marks during beta.
>
> http://p.sf.net/sfu/intel-sw-dev_______________________________________________Octave-devmailing
> list
> Octave-
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/octave-dev
>
>
>
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev