NN transfer function (tansig and purelin)
Mostrar comentarios más antiguos
I have a NN with tansig transfer function for hyden and pureline for output layer. The problem is that I'm not getting the same result as Matlab output.
load net.mat % load network object called network1
r = sim(network1, P(1))
xmin = network1.inputs{1}.processSettings{2}.xmin;
xmax = network1.inputs{1}.processSettings{2}.xmax;
xrange = xmax-xmin;
ymin = network1.outputs{2}.processSettings{2}.xmin;
ymax = network1.outputs{2}.processSettings{2}.xmax;
yrange = ymax-ymin;
P2 = (P(1)-xmin) * (2/xrange) - 1;
lay1 = tansig(network1.IW{1}*P(2)+network1.b{1});
r1 = purelin(network1.LW{2}*lay1+network1.b{2});
r2 = (r1+1) * (yrange/2) + ymin
Thanks
Respuestas (1)
Greg Heath
el 21 de Nov. de 2011
1 voto
Several posters, including myself have been unable to reproduce outputs using the weights stored with the network.
Hope this helps.
Greg
Categorías
Más información sobre Define Shallow Neural Network Architectures en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!