Struct leaf::solvers::sgd::momentum::Momentum [] [src]

pub struct Momentum<SolverB: IBackend + SolverOps<f32>> {
    // some fields omitted
}

Stochastic Gradient Descent with Momentum.

See module description for more information.

Methods

impl<SolverB: IBackend + SolverOps<f32>> Momentum<SolverB>

fn new(backend: Rc<SolverB>) -> Momentum<SolverB>

Create a new SGD Momentum solver.

Should not be called directly. Use Solver::from_config instead.

Trait Implementations

impl<SolverB: IBackend + SolverOps<f32>, NetB: IBackend + LayerOps<f32> + 'static> ISolver<SolverB, NetB> for Momentum<SolverB>

fn init(&mut self, net: &Layer<NetB>)

fn compute_update(&mut self, config: &SolverConfig, net: &mut Layer<NetB>, iter: usize)

fn backend(&self) -> &SolverB

Derived Implementations

impl<SolverB: Debug + IBackend + SolverOps<f32>> Debug for Momentum<SolverB>

fn fmt(&self, __arg_0: &mut Formatter) -> Result