mxnet
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Member Functions | List of all members
mxnet::Optimizer Class Referenceabstract

#include <optimizer.h>

Collaboration diagram for mxnet::Optimizer:
Collaboration graph

Public Member Functions

virtual ~Optimizer ()
 virtual destructor More...
 
virtual void Init (const std::vector< std::pair< std::string, std::string > > &kwargs)=0
 Initialize the Optimizer by setting the parameters This function need to be called before all other functions. More...
 
virtual void CreateState (const int index, const NDArray *weight)=0
 Create aux state for weigth with index. More...
 
virtual void Update (const int index, NDArray *weight, const NDArray *grad, const float lr, const float wd)=0
 Update a weight with gradient. More...
 

Static Public Member Functions

static OptimizerCreate (const char *type_name)
 create Optimizer More...
 

Constructor & Destructor Documentation

virtual mxnet::Optimizer::~Optimizer ( )
inlinevirtual

virtual destructor

Member Function Documentation

static Optimizer* mxnet::Optimizer::Create ( const char *  type_name)
static

create Optimizer

Parameters
type_namethe type string of the Optimizer
Returns
a new constructed Optimizer
virtual void mxnet::Optimizer::CreateState ( const int  index,
const NDArray weight 
)
pure virtual

Create aux state for weigth with index.

Parameters
indexthe unique index for the weight.
weightthe NDArray to associate created state to.
virtual void mxnet::Optimizer::Init ( const std::vector< std::pair< std::string, std::string > > &  kwargs)
pure virtual

Initialize the Optimizer by setting the parameters This function need to be called before all other functions.

Parameters
kwargsthe keyword arguments parameters
virtual void mxnet::Optimizer::Update ( const int  index,
NDArray weight,
const NDArray grad,
const float  lr,
const float  wd 
)
pure virtual

Update a weight with gradient.

Parameters
indexthe unique index for the weight.
weightthe weight to update.
gradgradient for the weight.
lrlearning rate for this update.
wdweight decay for this update.

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