Blogs/Neural Network Predictions

Neural Network Predictions

peter.washington Sep 08 2021 2 min read 781 views

Stanford applied ML PhD

Neural Networks
Neural Network Predictions.png

Let's say we want to predict the following neural network's output prediction when it has been trained with these weights:

Neural Network Predictions

We will call the first 3 nodes in the first layer A, B, and C. We will call the two hidden nodes D and E. With these node names, we get the following equation for y (we are setting the bias to 0 for simplicity):

y = sigmoid(4D + 2E)

To get the equation for y in terms of the input nodes, we must write out the equation for nodes D and E:

D = relu(-3A+2B- C)
E = relu(A+3B+7C)

The equation for y in terms of the input nodes is obtained by plugging in these equations for D and E back into the equation for y (again, remember that we are setting the bias to 0 for simplicity):

y= sigmoid(4D+2E=4-3A+2B- C+2A+3B+7C) 
=  sigmoid(-12A+8B- 4C+ 2A+6B+14C)
= sigmoid(-10A+14B+10C)

 

Learn and practice this concept here: 

https://mlpro.io/problems/mlp-prediction/