MATLAB: Neural Network neuron values

crossentropyneural network classifierpatternnetsoftmaxtutorial

I'm interested in seeing how and when the inputs and weights are modified using a pre-trained standard patternnet classifier. For example using the crab dataset (6 inputs, 2 layers, 2 outputs, and 10 hidden neurons). Can the steps be confirmed as:
1) For each of n hidden neurons sum product of input i(1-6) with input weight(n)(1-6)
2) Add specific bias(n) to sum
3) Normalize to -1:1 range using mapminmax
4) For each of 2 output neurons sum product of hidden neurons with layer2 weights
5) Add layer 2 specific bias.
6) Normalize again using mapminmax

Best Answer

0. [ I N ] = size(input) (I=6), [ O N ] = size(output) (O = 2),
1) Use mapminmax to obtain 6xN dimensional normalized (-1:1 column range)input column matrix xn from original 6xN matrix, x.
2) Add the 10 dimensional input bias column vector b1, to the product of the 10x6 dimensional input weight matrix, IW, with x.
3) Apply the tansig function to the sum to get the 10-dimensional hidden node signal, h = tansig(b1+IW*xn)
4) Obtain the normalized output,yn, by adding the 2 dimensional output bias column vector b2, to the product of the 2x10 dimensional output weight matrix, LW, with h.
5) Obtain output y by unnormalizing yn using mapminmax