the value of L in first is same in both equations shown below

Hi

yes there are 2 different equations calculate number of layers… As when we create W and b we add it to parameters dictionary compress parameters(W , b) in dictionary as when we need to use those parameters(W , b) we send the dictionary to function arguments so number of layers is the floor division of 2 of len(parameters) // 2 as we have 2 parameters(W,b)

hint

#the floor division // rounds the result down to the nearest whole number

x = 15

y = 2

print(x // y) = 7

please feel free to ask any question

Thanks,

Abdelrahman

It’s also worth pointing out that the L in the first case is not really the number of layers in the network, according to Prof Ng’s nomenclature. It includes the input size, so it is really one greater than the number of layers. But it all depends on how they use that L value in the later code. Remember that indexing is 0-based in python. Run the following loop and watch what happens:

```
for ii in range(5):
print(f"ii = {ii}")
```