Drexel dragonThe Math ForumDonate to the Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Configure neural network without train
Replies: 6   Last Post: May 14, 2016 4:01 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 4
Registered: 8/9/12
Configure neural network without train
Posted: Aug 9, 2012 11:30 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


I'm treating with dynamic recurrent neural networks, NARX in my case, and my objective is to adjust the parameters with genetic algorithm. Therefore I am not using the 'train' command, but I have to configure the network by hand (either manually or with the 'configure' command) and handle the weights and bias vectors with 'getwb' and 'setwb'. The problem I'm encountering is that I can't set and retrieve the networks parameters because I think the net is not getting correctly configured.

I'm trying with the net configuration in two ways, the first one manually (assigning input and output sizes and ranges, input preprocessing settings and output postprocessing settings), I do this by typing:

nn.inputs{1}.exampleInput = nnDataIn;
nn.inputs{2}.exampleInput = nnDataOut;

(The net has 2 input sources because it's in open loop at the moment)

And althought I got correct inputs and output sizes, ranges and I can initialize the weights using 'init' with success; I can't get or set them with 'getwb' or 'setwb'. I get this error:

SWITCH expression must be a scalar or string constant.

Error in network/subsref (line 140)
switch (subs)

Error in getwb (line 22)
inputLearn = net.hint.inputLearn;

I tried to configure the net in another way with the 'configure' command:

nn = configure(nn, nnDataIn, nnDataOut);

But I get this error:

Error using network/configure (line 111)
The numbers of input signals and networks inputs do not match.

I guess it's because the net has 2 input sources and I'm passing only 1 input signal and the target signal, but I don't know how to use 'configure' in another way.

When I try with the closed-loop version of the net, the story changes a bit only, I can't configure it in such a way that I could handle the parameters vectors with 'getwb' or 'setwb'. But if I use the 'configure' exactly in the same way that with the open-loop version, then it doesn't return any error (I guess it's because this net has only 1 input signal and the 'configure' command is executed in a proper way).

Could you tell me how could I configure correctly the first net? A dynamic recurrent neural network (NARX) in open loop mode that has 2 input sources and 1 output.

And I wanted to ask you one more thing related to this configuration process: If I configure the net in this way with sample data, will I have problems with the simulation (I won't use 'train') if I use another sample data? I mean with the normalization process and the process settings, or the net reconfigures the ranges each time a simulation is done?

Thanks you in advance.


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2015. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.