LeakyReLUVector class

Applies leaky ReLu over a given input of type Tensor<Vector>. In contrast to the standard ReLU function, this function multiplies negative values with a small negative number alpha to prevent the dying gradient problem.

The value of alpha dictates the slope of the function for negative inputs and is set to 0.01 by default. The calculation is handled via the leakyReluVector math operation.

Example:

Tensor<Vector> v = Tensor<Vector>([-1.0, 0.0, 1.0]);
LeakyReLUVector leakyRelu = LeakyReLUVector(alpha: 0.02);
Tensor<Vector> out = leakyRelu(v);
Implemented types

Constructors

LeakyReLUVector({double alpha = 0.01})

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<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