NN transfer function (tansig and purelin)

5 Ansichten (letzte 30 Tage)
Youssef
Youssef am 21 Nov. 2011
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

Antworten (1)

Greg Heath
Greg Heath am 21 Nov. 2011
Several posters, including myself have been unable to reproduce outputs using the weights stored with the network.
Hope this helps.
Greg

Community Treasure Hunt

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

Start Hunting!

Translated by