This is a base class for descend update.
The class give the interface used in descend-based minimizer.
Given a target variable, \(w\), and its negative descend direction \(g\), the class will update \(w\) based on \(g\) (eg, subtracting \(g\))
Note that an example of \(g\) is to simply use the gradient wrt \(w\).
在文件 DescendUpdater.h 第 49 行定义.
Public 成员函数 | |
virtual void | update_variable (SGVector< float64_t > variable_reference, SGVector< float64_t > negative_descend_direction, float64_t learning_rate)=0 |
virtual void | update_context (CMinimizerContext *context)=0 |
virtual void | load_from_context (CMinimizerContext *context)=0 |
|
pure virtual |
Load the given context object to restore mutable variables
This method will be called by FirstOrderMinimizer::load_from_context(CMinimizerContext* context)
context | a context object |
在 DescendUpdaterWithCorrection, AdaDeltaUpdater, RmsPropUpdater , 以及 AdaGradUpdater 内被实现.
|
pure virtual |
Update a context object to store mutable variables used in descend update
This method will be called by FirstOrderMinimizer::save_to_context()
context | a context object |
在 DescendUpdaterWithCorrection, AdaDeltaUpdater, RmsPropUpdater , 以及 AdaGradUpdater 内被实现.
|
pure virtual |
Update the target variable based on the given negative descend direction
Note that this method will update the target variable in place. This method will be called by FirstOrderMinimizer::minimize()
variable_reference | a reference of the target variable |
negative_descend_direction | the negative descend direction given the current value |
learning_rate | learning rate |
在 AdaDeltaUpdater, RmsPropUpdater, AdaGradUpdater , 以及 DescendUpdaterWithCorrection 内被实现.