Output of Feedforward Network does not match manual calculations

1 次查看(过去 30 天)
Hi,
I have trained a small network with 1 hidden layer with 10 nodes..
iInputsSize=4; % 4 inputs
iOutputsSize=3; % 3 outputs
sTrainFcn = 'trainlm'; % Function
iHiddenLayerSize = 10; % Hidden Layer Size
net = fitnet(iHiddenLayerSize,sTrainFcn);
net.divideParam.trainRatio = 70/100;
net.divideParam.valRatio = 15/100;
net.divideParam.testRatio = 15/100;
net.performFcn = 'mse';
net.performParam.regularization = 0;
net.trainparam.epochs = 1000;
net.trainParam.goal = 0;
net.trainParam.mu = 1.0000e-03;
net.trainParam.max_fail = 6;
net.layers{1}.transferFcn = 'tansig';
net.layers{2}.transferFcn = 'purelin';
[net,tr] = train(net,x,t);
%% Test
x=[0.002982739 -0.004732588 0.012710054 0.002787759]
y = net(x);
...and tried to match its output doing manual calculations. The outputs do not match.
>> x=[0.002982739 -0.004732588 0.012710054 0.002787759]'
x =
0.0030
-0.0047
0.0127
0.0028
>> y=net(x)
y =
0.0307
0.0036
0.0175
Calculated parameters:
Would anyone know if there is anything that I'm missing please?
Thank you,
G

回答(0 个)

产品


版本

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by