I used newelm to train the network and used the result of weight to make a pratic elman network but i had different result can i know where is thee wrong . when i used this code:
n=[0 1 0 1]
t=[1 0 1 0]
net=newelm(n,t,1,{'tansig','purelin'})
net=train(net,n,t)
wb=getwb(net)
o=sim(net,n)
n1=[-1 1 -1 1]
t1=[1 -1 1 -1]
h=0
for k=1:4
h=tansig(n1(k)*wb(2)+h*wb(3)+wb(1))
y(k)=purelin(h*wb(5)+wb(4))
end
thanks

 Réponse acceptée

Greg Heath
Greg Heath le 29 Nov 2013

0 votes

Your values of wb(k) are in the wrong order. Try
IW = cell2mat(net.IW)
b = cell2mat(net.b)
LW = cell2mat(net.LW)
HTH
Greg

Plus de réponses (0)

Catégories

En savoir plus sur Deep Learning Toolbox dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by