|
ONE - On-device Neural Engine
|
SGD optimizer. More...
#include <SGD.h>

Data Structures | |
| struct | Property |
Public Types | |
| using | UpdateFactors = exec::train::optimizer::UpdateFactors |
Public Member Functions | |
| SGD () | |
| SGD (const Property &props) | |
| SGD (double lr) | |
| SGD (const Property &props, double lr) | |
| std::string | name () const override |
| Get the name of optimizer. | |
| double | getLearningRate (uint32_t iteration=0) const override |
| Get the Learning Rate. | |
| virtual uint32_t | getVarCount () const override |
| Get the number of optimizer variables s. | |
| void | applyGradient (const UpdateFactors &factors) const override |
| Apply gradient to a trainable tensor. | |
Public Member Functions inherited from onert::exec::train::optimizer::Optimizer | |
| virtual | ~Optimizer ()=default |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
overridevirtual |
Apply gradient to a trainable tensor.
| factors | UpdateFactors to be used for applying gradient to a trainable tensor |
Implements onert::exec::train::optimizer::Optimizer.
Definition at line 32 of file SGD.cc.
References getLearningRate(), and nnfw::cker::train::GradientDescent().
|
overridevirtual |
Get the Learning Rate.
| iteration | The number of training steps |
Implements onert::exec::train::optimizer::Optimizer.
Definition at line 26 of file SGD.cc.
Referenced by applyGradient().
|
inlineoverridevirtual |
Get the number of optimizer variables s.
Implements onert::exec::train::optimizer::Optimizer.
Definition at line 68 of file SGD.h.
|
inlineoverridevirtual |
Get the name of optimizer.
Reimplemented from onert::exec::train::optimizer::Optimizer.
Definition at line 53 of file SGD.h.