What is the purpose of an activation function in a neural network?

Options

  • A. To introduce non-linearity and determine the output of a neuron based on its input
  • B. To permanently store training data
  • C. To divide a dataset into training and testing sets
  • D. To replace the weights of all neurons with zero
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

A. To introduce non-linearity and determine the output of a neuron based on its input

Detailed Explanation

An activation function determines the output of a neuron after processing its weighted inputs. Functions such as Sigmoid, ReLU, and Tanh introduce non-linearity, allowing neural networks to learn complex relationships that cannot be represented effectively by a simple linear model.