Explicit equation did not give the result same as the output value obtained from ANN model

1 view (last 30 days)
I developed my ANN model using tangsig activation function for the hidden layer and purelin for the output layer. I have saved the model beforehand so that weight and bias will not change after I run the model again. I obtain the weight and bias from the network by using following commands:
InputWeight = LTnet2.IW{1,1}
LayerWeight = LTnet2.LW{2,1}
InputBias = LTnet2.b{1,1}
LayerBias = LTnet2.b{2,1}
I used the weights and bias to form the explicit equations where:
Layer 1 : y1 = tanh(X*InputWeight+InputBias)
Layer 2 : y2 = y1*LayerWeight+LayerBias
However, after I developed the explicit equations and want to test the new data with the equations to predict the output, the value is different from what is predicted from the model. Can anyone advise me what is the problem?

Answers (0)

Community Treasure Hunt

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

Start Hunting!