MATLAB: Artificial neural network – weights & biases

artificial neural networkDeep Learning Toolbox

Hi everybody, I have used net = newff(F, T,[],{},'traingdx') in MATLAB R2012a version where F is a 2×4601 input matrix and T is 1×4601 target row matrix. After choosing epochs, goal, min_grad and performFcn, i train the net with net1=train(net,F,T); After training weights and biases are as follows: w1 = [ 0.427926451246563 -0.185905577940879] and b = -0.248424844054488. Then I calculate T_net = sim(net1, F) and I compare T with respect to T_net. My question is: How can I obtain the same results of T_net by using the input matrix F, weights w1 and bias b? I've tryed T_calc = b + w1 * F; but it doesn't work. Is there a missing normalization? Can anyone explain me what's wrong?

Best Answer

1. newff automatically normalizes F and T to [-1,1] and then unnormalizes the net output to obtain Tnet
2. The default transformation between the normalized variables is
Tn = b2 + tansig( b1 + w1*Fn )
Hope this helps.
Thank you for formally accepting my answer
Greg