eneural_net library
eNeural.net library.
Classes
-
ActivationFunction<
N extends num, E> - Base class for Activation Functions.
- ActivationFunctionFloat32x4
- Base class for SIMD optimized functions using Float32x4.
- ActivationFunctionLinear
- Linear Activation Function (SIMD optimized).
- ActivationFunctionSigmoid
- Sigmoid Activation Function (SIMD optimized).
- ActivationFunctionSigmoidBoundedFast
- Fast Pseudo-Sigmoid Activation Function Bounded (SIMD optimized).
- ActivationFunctionSigmoidFast
- Fast Pseudo-Sigmoid Activation Function (SIMD optimized).
- ActivationFunctionSigmoidFastInt
- Experimental Integer Sigmoid Function.
- ActivationFunctionSigmoidFastInt100
- Experimental Integer Sigmoid Function (scale 100).
-
AdaDelta<
N extends num, E, T extends Signal< N, E, T> , S extends Scale<N> , P extends Sample<N, E, T, S> > - AdaDelta optimizer (Zeiler, 2012). Needs no global learning rate.
-
AdaGrad<
N extends num, E, T extends Signal< N, E, T> , S extends Scale<N> , P extends Sample<N, E, T, S> > - AdaGrad optimizer.
-
Adam<
N extends num, E, T extends Signal< N, E, T> , S extends Scale<N> , P extends Sample<N, E, T, S> > - Adam optimizer (Kingma & Ba, 2014), with optional AdamW decoupled weight decay, AMSGrad, and Nadam (Nesterov) variants.
-
ANN<
N extends num, E, T extends Signal< N, E, T> , S extends Scale<N> > - Artificial Neural Network
-
Backpropagation<
N extends num, E, T extends Signal< N, E, T> , S extends Scale<N> , P extends Sample<N, E, T, S> > - Implementation of Backpropagation training algorithm.
- Chronometer
- A Chronometer useful for benchmarks.
-
ConjugateGradient<
P extends VectorSample> - Nonlinear Conjugate Gradient (Fletcher–Reeves, with restarts + line search).
-
CosineAnnealingStrategy<
N extends num, E, T extends Signal< N, E, T> > -
Cosine annealing from
basedown to minValue over maxEpochs. - DataEntry
-
DataStatistics<
N extends num> -
DifferentialEvolution<
P extends PopulationSample> - Differential Evolution (DE/rand/1/bin).
-
EvolutionStrategy<
P extends PopulationSample> - (μ, λ) Evolution Strategy with a global step size (1/5-success adaptation).
-
ExponentialDecayStrategy<
N extends num, E, T extends Signal< N, E, T> > -
Exponential decay:
base · gamma^epoch. -
GeneticAlgorithm<
P extends PopulationSample> - Genetic Algorithm: tournament selection, blend crossover, Gaussian mutation, elitism.
-
GradientOptimizer<
N extends num, E, T extends Signal< N, E, T> , S extends Scale<N> , P extends Sample<N, E, T, S> > - Base class for per-weight gradient optimizers (Adam, RMSProp, AdaGrad, AdaDelta, Quickprop, Lion, SGD/Momentum, ...).
-
HiddenLayerConfig<
N extends num, E> - The configuration for the hidden layers.
-
Layer<
N extends num, E, T extends Signal< N, E, T> , S extends Scale<N> > - Base class for ANN layers.
- LayerFloat32x4
- ANN Layer for Float32x4 types.
-
LayerHidden<
N extends num, E, T extends Signal< N, E, T> , S extends Scale<N> > - Layer specialized for hidden neurons.
-
LayerInput<
N extends num, E, T extends Signal< N, E, T> , S extends Scale<N> > - Layer specialized for input neurons.
- LayerInt32x4
- ANN Layer for Int32x4 types.
-
LayerOutput<
N extends num, E, T extends Signal< N, E, T> , S extends Scale<N> > - Layer specialized for output neurons.
-
LBFGS<
P extends VectorSample> - Limited-memory BFGS (two-loop recursion + line search).
-
LearningRateScheduleStrategy<
N extends num, E, T extends Signal< N, E, T> > - Base for epoch-based learning-rate schedules. The value is recomputed each epoch from Training.trainedEpochs via computeValue.
-
LevenbergMarquardt<
P extends VectorSample> - Levenberg–Marquardt (damped Gauss–Newton). Excellent for small networks.
-
Lion<
N extends num, E, T extends Signal< N, E, T> , S extends Scale<N> , P extends Sample<N, E, T, S> > - Lion optimizer (EvoLved Sign Momentum, Chen et al., 2023).
-
NativeBackpropagation<
P extends NativeSample> - Backpropagation trainer accelerated by a native CPU/Metal backend.
-
NativeRProp<
P extends NativeSample> - Resilient Backpropagation (iRProp+) trainer accelerated by a native CPU/Metal backend.
-
ParameterStrategy<
N extends num, E, T extends Signal< N, E, T> > - Base class for training parameter strategy.
-
ParticleSwarm<
P extends PopulationSample> - Particle Swarm Optimization.
-
PopulationTrainer<
P extends PopulationSample> - Base for gradient-free trainers that optimize the flat weight vector (ANN.allWeights) using ANN.computeSamplesGlobalError as the fitness. Each learn call performs one generation/iteration and installs the best genome found into the ANN.
-
Quickprop<
N extends num, E, T extends Signal< N, E, T> , S extends Scale<N> , P extends Sample<N, E, T, S> > - Quickprop optimizer (Fahlman, 1988) — a second-order-ish method that fits a parabola through the current and previous gradient of each weight.
-
ResilientPropagation<
N extends num, E, T extends Signal< N, E, T> , S extends Scale<N> , P extends Sample<N, E, T, S> > -
RMSProp<
N extends num, E, T extends Signal< N, E, T> , S extends Scale<N> , P extends Sample<N, E, T, S> > - RMSProp optimizer.
-
RProp<
N extends num, E, T extends Signal< N, E, T> , S extends Scale<N> , P extends Sample<N, E, T, S> > - Implementation of Resilient Backpropagation (version iRProp+).
-
Sample<
N extends num, E, T extends Signal< N, E, T> , S extends Scale<N> > - Base class for ANN samples.
- SampleFloat32x4
- ANN sample based in Float32x4 data.
- SampleInt32x4
- SamplesGenerator
- Samples Generator.
-
SamplesSet<
P extends Sample< num, dynamic, dynamic, Scale< >num> > - Samples Set.
-
Scale<
N extends num> - Base class for scales used for ANN, Signal and Sample.
- ScaleDouble
-
A
Scale<double>. - ScaleInt
-
A
Scale<int>. -
ScaleZoomable<
N extends num> - ScaleZoomableDouble
- ScaleZoomableInt
-
SeparableCMAES<
P extends PopulationSample> - Separable (diagonal) CMA-ES: per-coordinate step sizes updated from the variance of the selected steps.
-
SGD<
N extends num, E, T extends Signal< N, E, T> , S extends Scale<N> , P extends Sample<N, E, T, S> > - Stochastic Gradient Descent with optional (classic or Nesterov) momentum.
-
Signal<
N extends num, E, T extends Signal< N, E, T> > - SignalFloat32x4
- SignalFloat32x4Mod4
- SignalInt32x4
-
SimulatedAnnealing<
P extends PopulationSample> - Simulated Annealing (single candidate, geometric cooling).
-
StaticParameterStrategy<
N extends num, E, T extends Signal< N, E, T> > - A parameter strategy with a static/constant value.
-
StepDecayStrategy<
N extends num, E, T extends Signal< N, E, T> > -
Step decay:
base · gamma^(epoch ~/ stepSize). -
Training<
N extends num, E, T extends Signal< N, E, T> , S extends Scale<N> , P extends Sample<N, E, T, S> > - Base class for training algorithms.
-
VectorTrainer<
P extends VectorSample> - Base for trainers that operate on the flat weight vector (ANN.allWeights) and use finite-difference gradients/Jacobians — robust for the small-network regime these second-order methods target.
-
WarmupStrategy<
N extends num, E, T extends Signal< N, E, T> > -
Linear warmup to
baseover warmupEpochs, constant thereafter. -
WebGpuBackpropagation<
P extends WebGpuSample> - Backpropagation trainer accelerated by WebGPU (browser GPU).
-
WebGpuRProp<
P extends WebGpuSample> - Resilient Backpropagation (iRProp+) trainer accelerated by WebGPU.
Enums
- ActivationFunctionScope
- Scope of the activation function.
- NativeBackend
- Native acceleration backend selection.
- RPropVariant
- Resilient Backpropagation variants (Riedmiller & Braun; Igel & Hüsken).
Mixins
-
WebGpuTrainerMixin<
P extends WebGpuSample> - Shared WebGPU async-training logic for the WebGpuRProp/WebGpuBackpropagation trainers.
Extensions
-
DataEntryExtension
on List<
E> -
SeriesMapExtension
on Map<
String, List< N> ?>
Functions
-
DefaultTrainingLogger(
Training< num, dynamic, Signal< training, String type, String message, [dynamic error, StackTrace? stackTrace]) → dynamicnum, dynamic, dynamic> , Scale<num> , Sample<num, dynamic, Signal< >num, dynamic, dynamic> , Scale<num> > -
defaultTrainingLogger(
Training< num, dynamic, Signal< training, String type, String message, [dynamic error, StackTrace? stackTrace]) → voidnum, dynamic, dynamic> , Scale<num> , Sample<num, dynamic, Signal< >num, dynamic, dynamic> , Scale<num> > - The default TrainingLogger.
-
registeredTrainings(
) → Iterable< String> - The registered algorithm names.
-
registerTraining(
String name, TrainingBuilderFn builder) → void -
Registers a trainer builder under
name(case-insensitive). -
restoreTrainingCheckpoint(
TrainingD training, Map< String, dynamic> checkpoint) → void -
Restores a checkpoint produced by saveTrainingCheckpoint into
training(which must have the same topology/algorithm/hyperparameters). -
saveTrainingCheckpoint(
TrainingD training) → Map< String, dynamic> -
Serializes a resumable checkpoint of
training: the ANN weights plus, for gradient optimizers, the optimizer state buffers and step counter. -
trainingByName(
String name, AnnD ann, SamplesD samples, {Map< String, dynamic> params = const {}}) → TrainingD -
Builds a trainer by
namewith optionalparams. Throws if unknown.
Typedefs
-
AnnD
= ANN<
double, Float32x4, SignalFloat32x4, Scale< double> > - ANN type used by the registry.
-
LearningRateScheduleBuilder<
N extends num, E, T extends Signal< N, E, T> > = ParameterStrategy<N, E, T> Function(Propagation<N, E, T, dynamic, dynamic> propagation, double baseLearningRate) -
Builds a learning-rate ParameterStrategy for an optimizer (used to plug in
LR schedules). Receives the optimizer (a
Propagation) and its base LR. -
SamplesD
= SamplesSet<
SampleFloat32x4> -
TrainingBuilder<
N extends num, E, T extends Signal< N, E, T> , S extends Scale<N> , P extends Sample<N, E, T, S> > = Training<N, E, T, S, P> Function(ANN<N, E, T, S> ann, SamplesSet<P> samplesSet) - A builder for Training instances.
-
TrainingBuilderFn
= TrainingD Function(AnnD ann, SamplesD samples, Map<
String, dynamic> params) - Builds a trainer from a parameter map.
-
TrainingD
= Training<
double, Float32x4, SignalFloat32x4, Scale< double> , SampleFloat32x4> - Concrete trainer type used by the name-based registry (Float32x4 networks).
-
TrainingLogger
= void Function(Training<
num, dynamic, Signal< training, String type, String message, [dynamic error, StackTrace? stackTrace])num, dynamic, dynamic> , Scale<num> , Sample<num, dynamic, Signal< >num, dynamic, dynamic> , Scale<num> > - Training logger.