Does the input layer of a neural network use activation functions, or is it just the hidden and output layers?
2 Answers
1
votes
2
votes
Here's a figure of a 3-layer neural network from Stanford's class on NN for visual recognition.
The two hidden layers will always have an activation function. The output layer may or may not have an activation function: for binary classification, you might have a sigmoid function to squash your output, but for regression, you typically will not have an activation function.
For clarity, the hidden layers compute:
output = activation_function(W x inputs + b)
As you probably know, the activation_function()
may be a sigmoid
, tanh
, ReLU
, or other.