次の行でネットワークを作成してトレーニングします。
% here input is 9x543, target is 2x543 and hidden is 6 and output has 2 neurons
net = newff(input,target,{hidden},{'logsig','logsig'},'trainlm');
[net,tr] = train(net,input,target);
トレーニング フェーズの後、次の行でネットワークをシミュレートします。
out1 = sim(net,input);
次に、次の行でネットワークの重みを取得します。
iwNet = net.IW{1,1};
lwNet = net.LW{2,1};
b1Net = net.b{1,1};
b2Net = net.b{2,1};
入力値の予測出力を取得するために、独自のネットワークを実装します。
% here input is 543x9 and target is 543x2
out2=logsig(logsig(input*iw'+repmat(b1',size(input,1),1))*lw'+repmat(b2',size(input,1),1));
同じ活性化関数、重み、およびバイアスを使用しているため、out1==out2 になると予想していました。しかし、out2 には非常に興味深い結果があります。(まだ 1 列目は 1 で、出力の 2 列目は 0 です)
私は何か見落としてますか?