DLPrimitives
Public Member Functions | List of all members
dlprim::solvers::SolverBase Class Referenceabstract

Base class for SGD based optimizers. More...

#include <include/dlprim/solvers/solver_base.hpp>

Inheritance diagram for dlprim::solvers::SolverBase:
dlprim::solvers::Adam dlprim::solvers::SGD

Public Member Functions

virtual void init (Net &n, ExecutionContext const &q)=0
 Prepare solver - takes all parameters that need to be trained and prepares buffers.
 
virtual void zero_grad (Net &n, ExecutionContext const &e)=0
 zero all gradients before accumulating them for next batch
 
virtual void apply (Net &n, ExecutionContext const &e)=0
 apply solver updates
 
void step (Net &n, ExecutionContext const &e)
 shortcut for single training step zero_grad, forward, backward, apply
 

Detailed Description

Base class for SGD based optimizers.


The documentation for this class was generated from the following file: