An elman neural network with mulltiple inputs
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi,
I am trying to code an elman neural network with 2 inputs, and one output (size 1).
The size of the first input is 3 - a time delayed signal with 3 historical values
The size of the second input is 2 .
X = Time_Delayed_Input_Signal; % 1 x 100
Z = Input_vector; % 2 x 100
T = Target_Values; % 1 x 100
delays = 3;
net = elmannet(1:2,10);
net = adddelay(net,delays);
net.numinputs = 2;
net.inputConnect = [1 1; 0 0];
net = configure(net,{X;X});
net.inputs{1}.size = delays;
net.inputs{2}.size = 2;
view(net)
[Xs,Xi,Ai] = preparets(net,{X;Z},T) % this is where things go wrong
Y = net(Xs,Xi,Ai);
As always, thanks for any help
Sincerely,
Septimus
0 commentaires
Réponses (1)
Mahesh Taparia
le 24 Mar 2020
Hi
You can use the elmannet as folllows:
net = elmannet(1:3,10); %%% NumDelays=3
[Xs,Xi,Ai,Ts] = preparets(net,X,T);
net = train(net,Xs,Ts,Xi,Ai);
view(net)
Y = net(Xs,Xi,Ai);
perf = perform(net,Ts,Y)
Hope it will help.
0 commentaires
Voir également
Catégories
En savoir plus sur Define Shallow Neural Network Architectures dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!