ONE - On-device Neural Engine
|
Base class for all optimizers. More...
#include <Optimizer.h>
Public Member Functions | |
virtual | ~Optimizer ()=default |
virtual std::string | name () const |
Get the name of optimizer. | |
virtual double | getLearningRate (uint32_t iteration) const =0 |
Get the Learning Rate. | |
virtual uint32_t | getVarCount () const =0 |
Get the number of optimizer variables s. | |
virtual void | applyGradient (const UpdateFactors &factors) const =0 |
Apply gradient to a trainable tensor. | |
|
virtualdefault |
|
pure virtual |
Apply gradient to a trainable tensor.
factors | UpdateFactors to be used for applying gradient to a trainable tensor |
Implemented in onert::backend::train::optimizer::Adam, and onert::backend::train::optimizer::SGD.
Referenced by onert::backend::train::ops::GradientApplier::applyGradient().
|
pure virtual |
Get the Learning Rate.
iteration | The number of training steps |
Implemented in onert::backend::train::optimizer::SGD, and onert::backend::train::optimizer::Adam.
|
pure virtual |
Get the number of optimizer variables s.
Implemented in onert::backend::train::optimizer::Adam, and onert::backend::train::optimizer::SGD.
Referenced by onert::backend::train::TensorBuilder::registerBackwardTensorInfo().
|
inlinevirtual |
Get the name of optimizer.
Reimplemented in onert::backend::train::optimizer::Adam, and onert::backend::train::optimizer::SGD.
Definition at line 52 of file Optimizer.h.