フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How can I derive the output based upon the weights and biases from the neural network?

1 回表示 (過去 30 日間)
ILoveML
ILoveML 2017 年 1 月 5 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I have a simple neural network with 7 inputs, 1 hidden layer with two neurons and 1 output. I got the weights and biases after training the network. Tried to derive the output using the following steps and got results very different from net(x'): b1 = net.b{1}; iw11 = net.iw{1}(1,:); iw12 = net.iw{1}(2,:); b2 = net.b{2}; lw = net.lw{2};
Theta1 =[b1(:,1),iw11;b1(:,2),iw12]; Theta2 =[b2,lw];
X = [ones(m,1),x]; % x is the input matrix of 38x7 a1 = Theta1 * X'; z1 = tansig(a1); % tansig transfer function tansig(n) = 2/(1+exp(-2*n))-1 z1 = [ones(1,38);z1]; % z2 = Theta2 * z1; output = z2;
Could you please let me know why? Below are the details of the definition of the network and source data (x: input, t: output) is attached:
net = fitnet(2); net.divideFcn = 'dividerand'; % Divide data randomly net.divideMode = 'sample'; % Divide up every sample net.divideParam.trainRatio = 70/100; net.divideParam.valRatio = 15/100; net.divideParam.testRatio = 15/100;
[net,tr] = train(net,x',t');
Thanks!

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by