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.