Solved – How to calculate output of this neural network

neural networksself-study

Neural network image

I am sure this is a pretty easy question for someone well versed with neural networks but it has had me running round the bends.

While I understand how this is to be done in principle, i.e. readjustment of weights according to the thresholds, but a solution or atleast a partial solution will be highly helpful.

Thank you

Best Answer

Ok my best guess based on http://neuralnetworksanddeeplearning.com/chap1.html.

The input is a linear activation $f(x)=x$ function which means that the input value will be in the first layer. So this means that :

  • Node 1 = 1
  • Node 2 = 0
  • Node 3 = 1
  • Node 4 = 0

In order to calculate the hidden nodes, we use the simple perceptron rule $\sum\limits_{j}{w_j x_j}$ where $w$ are the weights written next to the links and $x$ are the values from the nodes in the previous layer and $j$ the amount of nodes in the previous layer

Which results in node 5:

$(-1*5) + (0*3)+ (1*2) +(0*4) = -5+2= -3$ (so multiply weights with the input) Now we have a binary activation rule, which is just check if it is bigger than 0 or not. $-3<0$ so this means that this will be a 0.

Node 6:

$(1*6)+(0*-1)+(1*-2)+(0*5)= 6-2 = 4$ again we apply the binary threshold, and $4>0$ so this means this will become a 1.

Node 7: We take the output we just calculated and multiply it with the weight to get the output:

$(0*-1)+(2*1)=2$ which is larger than 0 so the output of the network is 1

I am not sure this is correct. But I hope it will at least help you to see someone else's interpretation of the exercise.

Related Question