The Exponential Linear Unit (ELU) is an activation function that pushes mean activations closer to zero, which speeds up learning. Unlike ReLU, ELU produces a smooth curve for negative inputs, reducing the impact of the vanishing gradient problem.
Given a list of values and a parameter alpha, apply the ELU activation to each element.
The parameter alpha controls the negative saturation value. As x approaches negative infinity, ELU(x) approaches -alpha.
Input: x = [1, -1, 0, 2, -0.5], alpha = 1
Output: [1, -0.6321205588, 0, 2, -0.3934693403]
Explanation: Positive values pass through, while nonpositive values use the exponential branch.
Input: x = [-1, -2, -3], alpha = 2
Output: [-1.2642411177, -1.7293294335, -1.9004258633]
Use the original value when it is positive.
Use alpha times exp(value) minus one for the nonpositive branch.
Sign in to take notes on this problem
Accepts: array
Accepts: number
The Exponential Linear Unit (ELU) is an activation function that pushes mean activations closer to zero, which speeds up learning. Unlike ReLU, ELU produces a smooth curve for negative inputs, reducing the impact of the vanishing gradient problem.
Given a list of values and a parameter alpha, apply the ELU activation to each element.
The parameter alpha controls the negative saturation value. As x approaches negative infinity, ELU(x) approaches -alpha.
Input: x = [1, -1, 0, 2, -0.5], alpha = 1
Output: [1, -0.6321205588, 0, 2, -0.3934693403]
Explanation: Positive values pass through, while nonpositive values use the exponential branch.
Input: x = [-1, -2, -3], alpha = 2
Output: [-1.2642411177, -1.7293294335, -1.9004258633]
Use the original value when it is positive.
Use alpha times exp(value) minus one for the nonpositive branch.
Sign in to take notes on this problem
Accepts: array
Accepts: number