What is the purpose of an activation function in a neural network?
-
A
To normalize the inputs to each layer
-
B
To introduce non-linearity so the network can learn complex patterns
-
C
To reduce the number of parameters in the model
-
D
To compute the gradient during backpropagation