Making sure my understanding for NN is correct

Hi, there! according to Andrew in the pic above, each layer has a number of nodes and thus each input goes to a node to implement z and a. From that, I understand that 1 in z[1] refers to layer 1 and 2 in z[2] refers to layer 2 and 1 in z1 refers to 1st node in the layer and 2 in z2 is the 2nd node. So, z[1]1 refers to z[1st L]1st node. While he mentioned that the four lines of equations in the pic implement only a one-layer NN. I hope you correct my understanding :neutral_face:

Another question, does the final node that predicts yhat implement z and a too or only a?

Hi,
yea I believe your understanding is correct.
however the picture you showed is a 2-layer NN (1 hidden layer, and 1 output layer. The input layer doesn’t count)

yhat is basically the activation of the last layer. So here, in case of 2-layer NN, yhat = a[2], so you can see z[2] is also used (to compute a[2])

1 Like

Thanks for your help, @Dyxuki!