ELUVector class
Applies the Exponential Linear Unit (ELU) activation function over a given input of type Tensor<Vector>.
In contrast to the standard ReLU function, this function has a small negative value for negative inputs, which can help prevent the dying ReLU problem and speed up learning by pushing the mean activation closer to zero.
The function is defined as f(x) = x if x > 0, and f(x) = alpha * (e^x - 1) if x <= 0. The value of alpha dictates the multiplier for negative inputs and is set to 1.0 by default. The calculation is handled via the eluVector math operation.
Example:
Tensor<Vector> v = Tensor<Vector>([-1.0, 0.0, 1.0]);
ELUVector elu = ELUVector(alpha: 1.0);
Tensor<Vector> out = elu(v);
- Implemented types
Properties
Methods
-
call(
Tensor< Vector> input) → Tensor<Vector> -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited