Struct vikos::teacher::Momentum [] [src]

pub struct Momentum {
    pub l0: f64,
    pub t: f64,
    pub inertia: f64,
}

Gradient descent with annealing learning rate and momentum

For the i-th event the learning rate is l = l0 * (1 + i/t)

Fields

Start learning rate

Smaller t will decrease the learning rate faster

After t events the start learning rate will be a half l0, after two t events the learning rate will be one third l0, and so on.

To simulate friction, please select a value smaller than 1 (recommended)

Trait Implementations

impl<M> Teacher<M> for Momentum where M: Model
[src]

Contains state which changes during the training, but is not part of the expertise Read more

Creates an instance holding all mutable state of the algorithm

Changes models coefficents so they minimize the cost function (hopefully)