# Why Non-linear Activation Functions (C1W3L07) | Summary and Q&A

87.5K views
âĒ
August 25, 2017
by
DeepLearningAI
Why Non-linear Activation Functions (C1W3L07)

## TL;DR

Nonlinear activation functions are crucial for neural networks to compute interesting functions, as using linear activation functions makes the network perform like a linear model.

## Key Insights

• ðŧ Nonlinear activation functions are essential for neural networks to compute complex functions.
• â Linear activation functions, also known as identity activation functions, do not introduce any nonlinearity into the network.
• â Linear hidden layers in neural networks are largely ineffective, as the composition of two linear functions results in a linear function.
• ðŊ Linear activation functions may be suitable for regression problems in the output layer when the target variable is a real number.
• â Using linear activation functions in neural networks is generally rare, except for specific circumstances such as compression tasks.
• ðą Nonlinear activation functions enable neural networks to learn and represent non-linear relationships in the data.
• ðĪŠ Nonlinearity becomes increasingly important as the network goes deeper and has multiple hidden layers.

## Transcript

why does your neural network need a nonlinear activation function turns out that for your neural network to compute interesting functions you do need to take a nonlinear activation function less you want so just the for prop equations for the neural network why don't we just get rid of this get rid of the function G and set a1 equals Z 1 or alterna... Read More

### Q: Why does a neural network need a nonlinear activation function?

Neural networks need nonlinear activation functions to compute complex functions. Using linear activation functions limits the network to performing linear operations only, making it less capable of learning and representing non-linear relationships in the data.

### Q: What happens when a neural network uses a linear activation function?

When a neural network uses a linear activation function, it essentially becomes equivalent to a linear model. The network computes the output as a linear function of the input features, which limits its ability to model and represent complex relationships in the data.

### Q: In which cases might linear activation functions be used in neural networks?

Linear activation functions can be suitable for regression problems, where the output variable Y is a real number. In such cases, using a linear activation function in the output layer allows the network to predict real-valued outputs. However, it is still important to use non-linear activation functions in the hidden layers for better model expressiveness.

### Q: Are there any scenarios where a linear activation function in a hidden layer would be useful?

Generally, using a linear activation function in a hidden layer is not recommended, as it limits the network's ability to compute more interesting functions. The composition of two linear functions is still a linear function, and thus, nonlinearity is necessary to capture complex patterns and relationships in the data.

## Summary & Key Takeaways

• Neural networks require nonlinear activation functions to compute complex functions, as using linear activation functions results in the network performing linear operations only.

• Linear activation functions, also known as identity activation functions, simply output the input value and do not introduce any nonlinearity into the network.

• A linear hidden layer in a neural network is largely ineffective, as the composition of two linear functions is still a linear function.