MATLAB Answers

Multiple output in TDNN (Time Delay Neural Network)

28 views (last 30 days)
Oresti
Oresti on 20 Oct 2011
Answered: Khalid on 4 Apr 2016
Hello,
My name is Oresti and I am currently working with time delay neural networks ("timedelaynet").
I have three inputs signals and three outputs signals, and the problem appears when the the data is prepared (for taking into account the delay established).
[Is_tr,Ii_tr,Ai_tr,Os_tr] = preparets(net,cell_inputs_train,cell_outputs_train);
The idea is to define the particular NN by establishing the different parameters, but actually this is in principle not allowed for the outputs:
Considering 'net' the struct for the TDNN, defined as:
net = timedelaynet(DELAYS,LAYERS);
it is absolutely feasible to define the number of inputs
net.numInputs = Ninputs;
but as far as I know you cannot modify the number of outputs
net.numOutputs (READ ONLY)
because you have only read permissions.
Of course, I know that the problem can be split so defining three independent TDNN for each output (my current solution) but I would like to know why I cannot define it directly.
If someone has an idea I will really appreciate the answer.
Thanks in advance,
Oresti.

Accepted Answer

Greg Heath
Greg Heath on 3 Oct 2012
% I have three inputs signals and three outputs signals, and the problem % appears when the the data is prepared (for taking into account the % delay established). % % % [Xs,Xi,Ai,Ts,EWs,shift] = preparets(net,Xnf,Tnf,Tf,EW) % % [Is_tr,Ii_tr,Ai_tr,Os_tr] = preparets(net,cell_inputs_train, ... % cell_outputs_train);
1. IF YOU PUT TRAINING DATA INTO PREPARETS, YOU WILL HAVE TO PREVENT CONFIGURE OR TRAIN FROM USING THE DEFAULT DIVIDERAND TO OBTAIN VAL & TEST DATA.
% The idea is to define the particular NN by establishing the different % parameters, but actually this is in principle not allowed for the outputs: % % Considering 'net' the struct for the TDNN, defined as: % % net = timedelaynet(DELAYS,LAYERS);
2. NO. THE NO. OF HIDDEN LAYER NODES, NOT THE NUMBER OF LAYERS.
% it is absolutely feasible to define the number of inputs % % net.numInputs = Ninputs; % % but as far as I know you cannot modify the number of outputs % % net.numOutputs (READ ONLY) % % because you have only read permissions.
3.NO. NUMBER OF INPUTS AND OUTPUTS RECOGNIZED BY THE NET IS DETERMINED BY ONFIGURE OR TRAIN
% Of course, I know that the problem can be split so defining three % independent TDNN for each output (my current solution) but I would % like to know why I cannot define it directly. % % If someone has an idea I will really appreciate the answer.
SEE 3 ABOVE. ALSO, MULTIDIMENSIONAL DOCUMENTATION EXAMPLES.
HOPE THIS HELPS.
GREG

More Answers (2)

Khalid
Khalid on 4 Apr 2016
I know this is a really old post, but I arrived here via google search and didn't find any of the answers worked for me. The answer which I found worked is here.
Basically for multi-dimensional inputs, or to produce multi-step forecast outputs all at once (equivalent to a multi-dimensional output) you need to create your inputs and outputs using
con2seq()
- Khalid.

Greg Heath
Greg Heath on 23 Nov 2011
In the call to preparenets the input and output dimensions are automatically determined.
Hope this helps.
Greg
  1 Comment
Oresti
Oresti on 25 Nov 2011
Hi Greg,
Conversely I experience this problem:
??? Error using ==> preparets at 164
Number of output signals does not match number of network's non-feedback outputs.
Error in ==> tdnn_test at 114
[Is_tr,Ii_tr,Ai_tr,Os_tr] = preparets(net,cell_inputs_train,cell_outputs_train);
Error in ==> TDNN_ESTIMATION_EXAMPLE_POS_ACC at 151
TDNN_struct = tdnn_test(I_Tr,O_Tr,I_Ts,O_Ts,...
Basically what I am passing as inputs and outputs are three signals (X,Y,Z) for the input and three signals (X,Y,Z) for the output.
Any idea?
Thanks in advance,
Oresti.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!