Configure neural network without train

2 views (last 30 days)
Rafael
Rafael on 11 Aug 2012
Hello,
I'm treating with a dynamic recurrent neural network:
NARX in open-loop mode
2 inputs source (inputs signal [10xNumSamples] and feedback signal [1xNumSamples] in series-parallel)
1 output
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;
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.
Could you tell me how could I use the 'configure' command to specify 2 input signals?
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.
Regards, Rafael

Answers (0)

Categories

Find more on Sequence and Numeric Feature Data Workflows in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!