mxnet
|
#include <optimizer.h>
Public Member Functions | |
AdaGradOptimizer (unsigned begin_num_update=0) | |
std::string | GetType () const override |
get optimizer type More... | |
void | Update (int index, NDArray weight, NDArray grad) override |
Update a weight with gradient. More... | |
Public Member Functions inherited from mxnet::cpp::Optimizer | |
Optimizer (unsigned begin_num_update) | |
constructor More... | |
virtual | ~Optimizer () |
destructor More... | |
template<typename T > | |
Optimizer * | SetParam (const std::string &name, const T &value) |
set config parameters More... | |
Optimizer * | SetLRScheduler (std::unique_ptr< LRScheduler > lrScheduler) |
std::string | Serialize () const |
Serialize the optimizer parameters to a string. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from mxnet::cpp::Optimizer | |
const std::vector< const char * > | GetParamKeys_ () const |
const std::vector< const char * > | GetParamValues_ () const |
unsigned | UpdateCount_ (int index) |
float | GetLR_ (int index) |
float | GetWD_ (int index) |
Static Protected Member Functions inherited from mxnet::cpp::Optimizer | |
static OpMap *& | op_map () |
Protected Attributes inherited from mxnet::cpp::Optimizer | |
std::map< std::string, std::string > | params_ |
std::map< int, unsigned > | count_ |
unsigned | begin_num_update_ |
unsigned | num_update_ |
std::unique_ptr< LRScheduler > | lrScheduler_ = nullptr |
|
explicit |
|
overridevirtual |
|
overridevirtual |
Update a weight with gradient.
index | the unique index for the weight. |
weight | the weight to update. |
grad | gradient for the weight. |
Implements mxnet::cpp::Optimizer.