Sequential Trainer
class SequentialTrainer(val network: SequentialNetwork, val cases: List<Exercise>, val lossFunction: LossFunction, val optimizer: Optimizer, val statistics: Statistics, acceptableError: Double = 0.001) : Trainer
A trainer for a SequentialNetwork using a list of Exercise instances to evaluate against the given lossFunction, updating the model parameters using the provided optimizer.
The optimizer controls how data is sampled from the given cases as well as how the network parameters are updated during training.
Sampling - Some optimizers may use all cases for each epoch, while others may sample a subset of cases. Iterations - Some optimizers may update parameters multiple times per epoch, while others may only update once.
Parameters
acceptable Error
Once the network reaches this level, it will stop training.
Constructors
Link copied to clipboard
constructor(network: SequentialNetwork, cases: List<Exercise>, lossFunction: LossFunction, optimizer: StatisticalOptimizer)
constructor(network: SequentialNetwork, cases: List<Exercise>, lossFunction: LossFunction, optimizer: Optimizer, statistics: Statistics, acceptableError: Double = 0.001)
Functions
Link copied to clipboard
Train the model for a number of iterations, a.k.a. epochs.