Answers.Body: <p>The input layer is just an <em><strong>abstraction</strong> for defining the number and/or type/shape of inputs</em> that the neural network accepts (for example, in Keras, you can use the class <a href="https://www.tensorflow.org/api_docs/python/tf/keras/layers/InputLayer" rel="nofollow noreferrer"><code>InputLayer</code></a>), 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.</p>
  <p>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 <a href="https://www.merriam-webster.com/dictionary/convention" rel="nofollow noreferrer"><em>convention</em></a>. If it's not counted, it's probably because of the just mentioned reasons.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-07-08T11:45:22.377Z
Answers.LastActivityDate: 2021-07-08T11:57:22.900Z
Answers.LastEditDate: 2021-07-08T11:57:22.900Z
Answers.UserDisplayName: nbro
Body: <p>I came across the following statement from the caption of figure 7.8 from the textbook <a href="https://web.stanford.edu/%7Ejurafsky/slp3/7.pdf" rel="nofollow noreferrer">Neural Networks and Neural Language Models</a></p>
  <blockquote>
  <p>the input layer is usually <strong>not counted</strong> when enumerating layers</p>
  </blockquote>
  <p>Why is the input layer excluded from counting?</p>
  <p>Is the reason just convention or based on its contribution?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-07-08T09:24:41.307Z
Comments.Text: 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.
Comments.UserDisplayName: Recessive
Tags: <neural-networks><hyper-parameters><input-layer>
Title: Why is the input layer of a neural network usually not counted?
UserDisplayName: hanugm
ThreadText: # Why is the input layer of a neural network usually not counted?
  
  (Asked by: username_0 on 2021-07-08)
  
  I came across the following statement from the caption of figure 7.8 from the textbook [Neural Networks and Neural Language Models](https://web.stanford.edu/%7Ejurafsky/slp3/7.pdf)
  
  > 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?
  
  **Tags:** neural-networks, hyper-parameters, input-layer
  
  > **Comments:**
  > **username_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.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2021-07-08. Score: 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`](https://www.tensorflow.org/api_docs/python/tf/keras/layers/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*](https://www.merriam-webster.com/dictionary/convention). If it's not counted, it's probably because of the just mentioned reasons.
  
  
  ---
  
  