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
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.
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 couldn’t get your question
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

