# Why identity function is generally treated as an activation function?

It is known that the primary purpose of activation functions, used in neural networks, is to introduce non-linearity.

Then how can the linear activation function, especially the identity function, be treated as an activation function?

Are there any special applications/advantages in using an identity function as I cannot see any such use theoretically?

I don't think there's still a consensus on this subject. In fact, you will often hear (or see) people say (or write) that they use "no activation (function)" or "linear activation" rather than saying that they use the "identity" (for example, see the documentation for the parameter activation here).