#include <itkAdaptiveStepsizeOptimizer.h>
This class implements a gradient descent optimizer with adaptive gain.
If
The gain
.
And the time
where
This method is described in the following references:
[1] P. Cruz, "Almost sure convergence and asymptotical normality of a generalization of Kesten's stochastic approximation algorithm for multidimensional case." Technical Report, 2005. http://hdl.handle.net/2052/74
[2] S. Klein, J.P.W. Pluim, and M. Staring, M.A. Viergever, "Adaptive stochastic gradient descent optimisation for image registration," International Journal of Computer Vision, vol. 81, no. 3, pp. 227-239, 2009. http://dx.doi.org/10.1007/s11263-008-0168-y
It is very suitable to be used in combination with a stochastic estimate of the gradient NewSamplesEveryIteration
to "true"
to achieve this effect. For more information on this strategy, you may have a look at:
Definition at line 71 of file itkAdaptiveStepsizeOptimizer.h.
Public Member Functions | |
virtual const char * | GetClassName () const |
virtual const ParametersType & | GetPreconditionVector () |
virtual double | GetSigmoidMax () const |
virtual double | GetSigmoidMin () const |
virtual double | GetSigmoidScale () const |
virtual bool | GetUseAdaptiveStepSizes () const |
ITK_DISALLOW_COPY_AND_MOVE (AdaptiveStepsizeOptimizer) | |
virtual void | SetSigmoidMax (double _arg) |
virtual void | SetSigmoidMin (double _arg) |
virtual void | SetSigmoidScale (double _arg) |
virtual void | SetUseAdaptiveStepSizes (bool _arg) |
![]() | |
void | AdvanceOneStep () override |
virtual double | GetCurrentTime () const |
virtual double | GetInitialTime () const |
virtual double | GetParam_A () const |
virtual double | GetParam_a () const |
virtual double | GetParam_alpha () const |
ITK_DISALLOW_COPY_AND_MOVE (StandardGradientDescentOptimizer) | |
virtual void | ResetCurrentTimeToInitialTime () |
virtual void | SetInitialTime (double _arg) |
virtual void | SetParam_A (double _arg) |
virtual void | SetParam_a (double _arg) |
virtual void | SetParam_alpha (double _arg) |
void | StartOptimization () override |
![]() | |
virtual unsigned int | GetCurrentIteration () const |
virtual const DerivativeType & | GetGradient () |
virtual const double & | GetLearningRate () |
virtual const unsigned long & | GetNumberOfIterations () |
virtual const DerivativeType & | GetSearchDirection () |
virtual const StopConditionType & | GetStopCondition () |
virtual const double & | GetValue () |
ITK_DISALLOW_COPY_AND_MOVE (GradientDescentOptimizer2) | |
virtual void | MetricErrorResponse (ExceptionObject &err) |
virtual void | ResumeOptimization () |
virtual void | SetLearningRate (double _arg) |
virtual void | SetNumberOfIterations (unsigned long _arg) |
void | StartOptimization () override |
virtual void | StopOptimization () |
![]() | |
const ParametersType & | GetCurrentPosition () const override |
virtual bool | GetMaximize () const |
virtual const ScaledCostFunctionType * | GetScaledCostFunction () |
virtual const ParametersType & | GetScaledCurrentPosition () |
bool | GetUseScales () const |
virtual void | InitializeScales () |
ITK_DISALLOW_COPY_AND_MOVE (ScaledSingleValuedNonLinearOptimizer) | |
virtual void | MaximizeOff () |
virtual void | MaximizeOn () |
void | SetCostFunction (CostFunctionType *costFunction) override |
virtual void | SetMaximize (bool _arg) |
virtual void | SetUseScales (bool arg) |
Static Public Member Functions | |
static Pointer | New () |
![]() | |
static Pointer | New () |
![]() | |
static Pointer | New () |
![]() | |
static Pointer | New () |
Protected Member Functions | |
AdaptiveStepsizeOptimizer () | |
void | UpdateCurrentTime () override |
~AdaptiveStepsizeOptimizer () override=default | |
![]() | |
virtual double | Compute_a (double k) const |
StandardGradientDescentOptimizer () | |
~StandardGradientDescentOptimizer () override=default | |
![]() | |
GradientDescentOptimizer2 () | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
~GradientDescentOptimizer2 () override=default | |
![]() | |
virtual void | GetScaledDerivative (const ParametersType ¶meters, DerivativeType &derivative) const |
virtual MeasureType | GetScaledValue (const ParametersType ¶meters) const |
virtual void | GetScaledValueAndDerivative (const ParametersType ¶meters, MeasureType &value, DerivativeType &derivative) const |
void | PrintSelf (std::ostream &os, Indent indent) const override |
ScaledSingleValuedNonLinearOptimizer () | |
void | SetCurrentPosition (const ParametersType ¶m) override |
virtual void | SetScaledCurrentPosition (const ParametersType ¶meters) |
~ScaledSingleValuedNonLinearOptimizer () override=default | |
Protected Attributes | |
ParametersType | m_PreconditionVector {} |
DerivativeType | m_PreviousSearchDirection {} |
std::string | m_StepSizeStrategy {} |
![]() | |
double | m_CurrentTime { 0.0 } |
bool | m_UseConstantStep { false } |
![]() | |
DerivativeType | m_Gradient {} |
DerivativeType | m_SearchDirection {} |
StopConditionType | m_StopCondition { MaximumNumberOfIterations } |
![]() | |
ScaledCostFunctionPointer | m_ScaledCostFunction {} |
ParametersType | m_ScaledCurrentPosition {} |
Private Attributes | |
double | m_SigmoidMax { 1.0 } |
double | m_SigmoidMin { -0.8 } |
double | m_SigmoidScale { 1e-8 } |
bool | m_UseAdaptiveStepSizes { true } |
using itk::AdaptiveStepsizeOptimizer::ConstPointer = SmartPointer<const Self> |
Definition at line 80 of file itkAdaptiveStepsizeOptimizer.h.
using itk::AdaptiveStepsizeOptimizer::Pointer = SmartPointer<Self> |
Definition at line 79 of file itkAdaptiveStepsizeOptimizer.h.
Standard ITK.
Definition at line 77 of file itkAdaptiveStepsizeOptimizer.h.
Definition at line 78 of file itkAdaptiveStepsizeOptimizer.h.
|
protected |
|
overrideprotecteddefault |
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::StandardGradientDescentOptimizer.
Reimplemented in elastix::AdaGrad< TElastix >.
|
virtual |
Get current gradient.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
itk::AdaptiveStepsizeOptimizer::ITK_DISALLOW_COPY_AND_MOVE | ( | AdaptiveStepsizeOptimizer | ) |
|
static |
Method for creation through the object factory.
|
virtual |
Set/Get the maximum of the sigmoid. Should be >0. Default: 1.0
|
virtual |
Set/Get the maximum of the sigmoid. Should be <0. Default: -0.8
|
virtual |
Set/Get the scaling of the sigmoid width. Large values cause a more wide sigmoid. Default: 1e-8. Should be >0.
|
virtual |
Set/Get whether the adaptive step size mechanism is desired. Default: true
|
overrideprotectedvirtual |
Function to update the current time If UseAdaptiveStepSizes is false this function just increments the CurrentTime by
time = max[ 0, time + sigmoid( -gradient*previousgradient) ]
In that case, also the m_PreviousGradient is updated.
Reimplemented from itk::StandardGradientDescentOptimizer.
|
protected |
Definition at line 136 of file itkAdaptiveStepsizeOptimizer.h.
|
protected |
The PreviousGradient, necessary for the CruzAcceleration
Definition at line 135 of file itkAdaptiveStepsizeOptimizer.h.
|
private |
Definition at line 142 of file itkAdaptiveStepsizeOptimizer.h.
|
private |
Definition at line 143 of file itkAdaptiveStepsizeOptimizer.h.
|
private |
Definition at line 144 of file itkAdaptiveStepsizeOptimizer.h.
|
protected |
Definition at line 137 of file itkAdaptiveStepsizeOptimizer.h.
|
private |
Settings
Definition at line 141 of file itkAdaptiveStepsizeOptimizer.h.
Generated on 2024-07-17
for elastix by ![]() |
![]() |