A doubt in code in "L_model_forward" in Assignment 1, Week 4

There is this line of code of defining Variable L in the Assignment “Building_your_Deep_Neural_Network_Step_by_Step”, Week 4:
->L = len(parameters) // 2
I want to know the significance behind dividing the length of “parameters” by 2. Seeking reply ASAP. Thanks.

1 Like

I guess this does not count as ASAP, but the answer is easy: there are two parameters for each layer, right? You have W^{[l]} and b^{[l]} for each layer, also known as the weights and biases.