SHOGUN
4.1.0
|
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\).
Definition at line 49 of file DescendUpdater.h.
Public Member Functions | |
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 |
Implemented in DescendUpdaterWithCorrection, AdaDeltaUpdater, RmsPropUpdater, and 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 |
Implemented in DescendUpdaterWithCorrection, AdaDeltaUpdater, RmsPropUpdater, and 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 |
Implemented in AdaDeltaUpdater, RmsPropUpdater, AdaGradUpdater, and DescendUpdaterWithCorrection.