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
  • 39,006
  • 12
  • 98
  • 176
hanugm
  • 3,571
  • 3
  • 18
  • 50
  • 1
    Context of enumerating? How are they enumerating non-input layers? Normally it's just because the input layer has nothing to do with the actual network. It just directly accepts an input. In another world, there's no such thing as the "input layer" and it's just called the input. – Recessive Jul 08 '21 at 09:24

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
  • 39,006
  • 12
  • 98
  • 176