I am trying to solve a linear regression problem using deep learning(Pytorch)
For linear regression
- Do we need to use the activation function?
- How many hidden layers are recommended?

If it’s a simple linear regression of the form y = b1 * x + b0 then a single layer with no activation function should suffice (its weight should fit to b1 and its bias should fit to b0).

1 Like