Can't get Neural Networks working

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't get Neural Networks working

DRLAN
Hi: I started working on the Neural Networks package. By following the User's
Guide, I can't get it started. The code I wrote is as follows:

p=[-1 -1 2 2;0 5 0 5]
t=[-1 -1 1 1]
mMinMaxElements=min_max(p)
[mTrainInputN,cMeanInput,cStdInput]=prestd(p)
nHiddenNeurons=5;
nOutputeurons=1;
BL_net=newff(mMinMaxElements,[nHiddenNeurons nOutputeurons],\
      {"tansig","purelin"},"trainlm","","mse");
[BLnet]=train(BL_net,p,t);
[mTestInputN]=trastd(p,cMeanInput,cStdInput);
[simOut]=sim(BLnet,p)

And the error message shows as:

error: 'finite' undefined near line 38 column 13
error: called from
    tansig at line 38 column 5
    __calcperf at line 85 column 20
    __trainlm at line 107 column 18
    train at line 125 column 11

Could anyone tell me, where goes wrong?
Thanks!

DRLAN



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: Can't get Neural Networks working

Mike Miller-4
On Wed, Aug 08, 2018 at 11:27:35 -0500, DRLAN wrote:
> error: 'finite' undefined near line 38 column 13
> error: called from
>     tansig at line 38 column 5
>     __calcperf at line 85 column 20
>     __trainlm at line 107 column 18
>     train at line 125 column 11
>
> Could anyone tell me, where goes wrong?

The finite function is an ancient Octave function that was deprecated in
version 4.0 and removed in version 4.4. Since the last release of the
neural net package was in 2010, it may not be compatible with the
current release of Octave.

If you are comfortable with mercurial, you can try working with the
development version of the package

  http://hg.code.sf.net/p/octave/nnet

Or you can try editing the code and replacing 'finite' with 'isfinite'.

There may be other incompatibilities due to bit rot.

--
mike



signature.asc (849 bytes) Download Attachment