3

I came across the following statement from the caption of figure 7.8 from the textbook Neural Networks and Neural Language Models

the input layer is usually not counted when enumerating layers

Why is the input layer excluded from counting?

Is the reason just convention or based on its contribution?

nbro
  • 42,615
  • 12
  • 119
  • 217
hanugm
  • 4,102
  • 3
  • 29
  • 63

1 Answers1

3

The input layer is just an abstraction for defining the number and/or type/shape of inputs that the neural network accepts (for example, in Keras, you can use the class InputLayer), so it doesn't usually compute any function (although it's possible that your implementation of the input layer performs e.g. some kind of preprocessing), like the other layers, including the output layer, do, but it just represents the inputs, which are passed to the next layer during the forward pass.

Whether it's counted or not as part of the count of the number of layers of a neural network, it's just a matter of convention. If it's not counted, it's probably because of the just mentioned reasons.

nbro
  • 42,615
  • 12
  • 119
  • 217