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:
(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?