Trait leaf::solver::ISolver [] [src]

pub trait ISolver<SolverB, B: IBackend + LayerOps<f32>> {
    fn compute_update(&mut self, param: &SolverConfig, network: &mut Layer<B>, iter: usize);
    fn backend(&self) -> &SolverB;

    fn init(&mut self, net: &Layer<B>) { ... }
}

Implementation of a specific Solver.

See Solvers

Required Methods

fn compute_update(&mut self, param: &SolverConfig, network: &mut Layer<B>, iter: usize)

Update the weights of the net with part of the gradient.

The second phase of backpropagation learning. Calculates the gradient update that should be applied to the network, and then applies that gradient to the network, changing its weights.

Used by step to optimize the network.

fn backend(&self) -> &SolverB

Returns the backend used by the solver.

Provided Methods

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

Initialize the solver, setting up any network related data.

Trait Implementations

impl<SolverB, B: IBackend + LayerOps<f32>> Debug for ISolver<SolverB, B>

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

Implementors