NN transfer function (tansig and purelin)
조회 수: 4 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
답변 (1개)
Greg Heath
2011년 11월 21일
Several posters, including myself have been unable to reproduce outputs using the weights stored with the network.
Hope this helps.
Greg
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!