# Question 1 of Practice quiz: TensorFlow implementation

In the Lecture Neural networks intuition, video Demand Prediction, it says that the input is also counted as an input layer, so I think that there must be 4 hidden layers + 1 input layer = 5 layers in total.

Hi @francesco4203
Welcome to the community!

The input layer isnâ€™t counted in the number of layers because input layer has nothing to do with the actual network. It just directly accepts an input.just called it as input layer to distinguish it from the rest of the layers

Happy Ramandan
Best Regards,
Abdelrahman

1 Like

Yes, input is not counted as a layer. However, output is counted as a layer, so, in the above image, we have three hidden layers and one output layer, total four.

Best,
Saif.

1 Like

LOL, but I am still confused. Then why is it known as layer 0? It should have no name as a layer to avoid confusion.

Where did you see this? In Python, indices is started from 0, so, layer 0 is the first hidden layer, not the input layer.

I counted this layer and answered the MCQ:5. But correct ans:4 and layer 0 isnâ€™t counted in the sum of the total layer.

just like he did

This is the answer Thanks Abdel

Hello @farhana_hossain,

Yes, for the sake of these courses, the simple rule is only the hidden layers and the output layer are counted.

Many things can carry the term â€ślayerâ€ť in their names, say, in the Tensorflow framework. For example, besides the input layer, sometimes, people regard activation as a layer so that instead of one â€śReLU Dense layerâ€ť, we have a â€śDense layer without activationâ€ť followed by a â€śReLU activationâ€ť layer.

Should we, then, change how we count the number of layers, knowing that they are equivalent? I think we shouldnâ€™t, and if we keep that simple rule in mind, we wouldnâ€™t.

Cheers,
Raymond

1 Like