SwishMatrix class

Applies the Sigmoid-weighted Linear Unit (SiLU / Swish) activation function to each element inside of a given input of type Tensor<Matrix>. Defined mathematically as f(x) = x * sigmoid(x), this modern activation function often outperforms standard ReLU in deeper hidden layers.

The calculation is handled via the swishMatrix math operation.

Example:

Tensor<Matrix> m = Tensor<Matrix>([[1.0, 2.0], [3.0, 4.0]]);
SwishMatrix swish = SwishMatrix();
Tensor<Matrix> out = swish(m);
Implemented types

Constructors

SwishMatrix()

Properties

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