DLPrimitives
|
Base class for SGD based optimizers. More...
#include <include/dlprim/solvers/solver_base.hpp>
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 | |
Base class for SGD based optimizers.