ActivationFunction<N extends num, E> class abstract

Base class for Activation Functions.

Implementers

Constructors

ActivationFunction(String name, double initialWeightScale, {double initialWeightBiasValue = 0.0, double flatSpot = 0.0001})
const

Properties

flatSpot double
final
hashCode int
The hash code for this object.
no setterinherited
initialWeightBiasValue double
final
initialWeightScale double
final
name String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scope List<ActivationFunctionScope>
Scopes where this activation function should be used.
no setter

Methods

activate(N x) → N
The activation function.
activateEntry(E entry) → E
The activation function for an entry (SIMD).
createRandomWeight(Random random, {double? scale}) double
Generates a random weight compatible with this activation function.
createRandomWeights(Random random, int length, {double? scale}) List<double>
Generates a List of random weights compatible with this activation function.
derivative(N o) → N
The derivative function.
derivativeEntry(E entry) → E
The derivative function for an entry (SIMD).
derivativeEntryWithFlatSpot(E entry) → E
The derivative function for an entry with flat spot (SIMD).
derivativeWithFlatSpot(N o) → N
The derivative function with flat spot.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson({bool withIndent = false}) String
Converts to an encoded JSON.
toJsonMap() Map<String, dynamic>
Converts to a JSON Map.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

byName<N extends num, E>(String name, {double? initialWeightScale, double? scale}) ActivationFunction<N, E>
fromJson<N extends num, E>(dynamic json) ActivationFunction<N, E>
Decodes JSON.

Constants

TOO_BIG → const double
TOO_SMALL → const double