ELUMatrix class

Applies the Exponential Linear Unit (ELU) activation function over a given input of type Tensor<Matrix>. 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 eluMatrix math operation.

Example:

Tensor<Matrix> m = Tensor<Matrix>([[-1.0, 2.0], [-3.0, 4.0]]);
ELUMatrix elu = ELUMatrix(alpha: 1.0);
Tensor<Matrix> out = elu(m);
Implemented types

Constructors

ELUMatrix({double alpha = 1.0})

Properties

alpha ↔ double
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

call(Tensor<Matrix> input) → Tensor<Matrix>
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