How can I solve this problem?
이전 댓글 표시
Why does the outcome of this code:
function Ks = nn_ks(v, f, t)
for i=1:27
v=[80;80;80;80;80;80;80;80;80;150;150;150;150;150;150;150;150;150;220;220;220;220;220;220;220;220;220;]
f=[0.05;0.05;0.05;0.1;0.1;0.1;0.15;0.15;0.15;0.05;0.05;0.05;0.1;0.1;0.1;0.15;0.15;0.15;0.05;0.05;0.05;0.1;0.1;0.1;0.15;0.15;0.15;]
t=[5;10;15;5;10;15;5;10;15;5;10;15;5;10;15;5;10;15;5;10;15;5;10;15;5;10;15;]
v(i,1)=(v(i,1)-80)./(220-80)
f(i,1)=(f(i,1)-0.05)./(0.15-0.05)
t(i,1)=(t(i,1)-5)./(15-5)
X=[v(i,1); f(i,1); t(i,1)]
W1 = [0.83953 1.416 4.3197;
0.70603 -4.1921 -0.30888;
-3.1168 2.7796 0.75788]
B1=[-3.1521;
-0.45802;
-2.9756]
W2 =[0.70956 1.1833 -0.059955]
B2 =[-0.98502];
Y1 = logsig(W1*X + B1*ones(1,size(X,2)));
Y2 = purelin(W2*Y1 + B2*ones(1,size(Y1,2)));
Ks(i,1) =Y2.'
end
is very different from the outcome (outputs) of NN Toolbox when the same weights, biases, learning functions and algorithms are used?
채택된 답변
추가 답변 (2개)
Walter Roberson
2013년 11월 13일
0 개 추천
Most of the NN routines initialize weights randomly. It is also possible to set particular weights, but I do not recall how to do that (Greg Heath has shown how to do it more than once.)
댓글 수: 3
Parwaz Ali
2013년 11월 13일
Walter Roberson
2013년 11월 13일
You could search... I would guess using the terms
NN random weight contributor:"greg heath"
might find relevant posts.
Parwaz Ali
2013년 11월 14일
카테고리
도움말 센터 및 File Exchange에서 MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!