#include <elxStandardGradientDescent.h>
A gradient descent optimizer with a decaying gain.
This class is a wrap around the StandardGradientDescentOptimizer class. It takes care of setting parameters and printing progress information. For more information about the optimisation method, please read the documentation of the StandardGradientDescentOptimizer class.
The parameters used in this class are:
Optimizer: Select this optimizer as follows:
(Optimizer "StandardGradientDescent")
MaximumNumberOfIterations: The maximum number of iterations in each resolution.
example: (MaximumNumberOfIterations 100 100 50)
Default/recommended value: 500.
MaximumNumberOfSamplingAttempts: The maximum number of sampling attempts. Sometimes not enough corresponding samples can be drawn, upon which an exception is thrown. With this parameter it is possible to try to draw another set of samples.
example: (MaximumNumberOfSamplingAttempts 10 15 10)
Default value: 0, i.e. just fail immediately, for backward compatibility.
SP_a: The gain at each iteration is defined by
.
SP_a can be defined for each resolution.
example: (SP_a 3200.0 3200.0 1600.0)
The default value is 400.0. Tuning this variable for you specific problem is recommended.
SP_A: The gain at each iteration is defined by
.
SP_A can be defined for each resolution.
example: (SP_A 50.0 50.0 100.0)
The default/recommended value is 50.0.
SP_alpha: The gain at each iteration is defined by
.
SP_alpha can be defined for each resolution.
example: (SP_alpha 0.602 0.602 0.602)
The default/recommended value is 0.602.
Definition at line 68 of file elxStandardGradientDescent.h.
Static Public Member Functions | |
static Pointer | New () |
Static Public Member Functions inherited from itk::StandardGradientDescentOptimizer | |
static Pointer | New () |
Static Public Member Functions inherited from itk::GradientDescentOptimizer2 | |
static Pointer | New () |
Static Public Member Functions inherited from itk::ScaledSingleValuedNonLinearOptimizer | |
static Pointer | New () |
Static Public Member Functions inherited from elastix::BaseComponent | |
template<typename TBaseComponent > | |
static auto | AsITKBaseType (TBaseComponent *const baseComponent) -> decltype(baseComponent->GetAsITKBaseType()) |
static void | InitializeElastixExecutable () |
static bool | IsElastixLibrary () |
Protected Member Functions | |
StandardGradientDescent () | |
~StandardGradientDescent () override=default | |
Protected Member Functions inherited from itk::StandardGradientDescentOptimizer | |
virtual double | Compute_a (double k) const |
StandardGradientDescentOptimizer () | |
virtual void | UpdateCurrentTime () |
~StandardGradientDescentOptimizer () override=default | |
Protected Member Functions inherited from itk::GradientDescentOptimizer2 | |
GradientDescentOptimizer2 () | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
~GradientDescentOptimizer2 () override=default | |
Protected Member Functions inherited from itk::ScaledSingleValuedNonLinearOptimizer | |
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 Member Functions inherited from elastix::OptimizerBase< TElastix > | |
virtual bool | GetNewSamplesEveryIteration () const |
OptimizerBase ()=default | |
virtual void | SelectNewSamples () |
~OptimizerBase () override=default | |
Protected Member Functions inherited from elastix::BaseComponentSE< TElastix > | |
BaseComponentSE ()=default | |
~BaseComponentSE () override=default | |
Protected Member Functions inherited from elastix::BaseComponent | |
BaseComponent ()=default | |
virtual | ~BaseComponent ()=default |
Private Attributes | |
elxOverrideGetSelfMacro | |
unsigned long | m_CurrentNumberOfSamplingAttempts |
unsigned long | m_MaximumNumberOfSamplingAttempts |
unsigned long | m_PreviousErrorAtIteration |
using elastix::StandardGradientDescent< TElastix >::ConstPointer = itk::SmartPointer<const Self> |
Definition at line 80 of file elxStandardGradientDescent.h.
using elastix::StandardGradientDescent< TElastix >::ITKBaseType = typename Superclass2::ITKBaseType |
Definition at line 102 of file elxStandardGradientDescent.h.
using elastix::StandardGradientDescent< TElastix >::Pointer = itk::SmartPointer<Self> |
Definition at line 79 of file elxStandardGradientDescent.h.
using elastix::StandardGradientDescent< TElastix >::Self = StandardGradientDescent |
Standard ITK.
Definition at line 76 of file elxStandardGradientDescent.h.
using elastix::StandardGradientDescent< TElastix >::Superclass1 = StandardGradientDescentOptimizer |
Definition at line 77 of file elxStandardGradientDescent.h.
using elastix::StandardGradientDescent< TElastix >::Superclass2 = OptimizerBase<TElastix> |
Definition at line 78 of file elxStandardGradientDescent.h.
|
protected |
|
overrideprotecteddefault |
|
overridevirtual |
Reimplemented from elastix::BaseComponent.
|
overridevirtual |
Reimplemented from elastix::BaseComponent.
|
overridevirtual |
Reimplemented from elastix::BaseComponent.
|
overridevirtual |
Reimplemented from elastix::BaseComponent.
|
overridevirtual |
Methods invoked by elastix, in which parameters can be set and progress information can be printed.
Reimplemented from elastix::BaseComponent.
elastix::StandardGradientDescent< TElastix >::elxClassNameMacro | ( | "StandardGradientDescent< TElastix >" | ) |
Name of this class. Use this name in the parameter file to select this specific optimizer. example: (Optimizer "StandardGradientDescent")
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::StandardGradientDescentOptimizer.
|
virtual |
Get the MaximumNumberOfSamplingAttempts.
elastix::StandardGradientDescent< TElastix >::ITK_DISALLOW_COPY_AND_MOVE | ( | StandardGradientDescent< TElastix > | ) |
|
override |
Stop optimisation and pass on exception.
|
static |
Method for creation through the object factory.
|
inlineoverridevirtual |
Add SetCurrentPositionPublic, which calls the protected SetCurrentPosition of the itkStandardGradientDescentOptimizer class.
Reimplemented from elastix::OptimizerBase< TElastix >.
Definition at line 137 of file elxStandardGradientDescent.h.
|
virtual |
Set the MaximumNumberOfSamplingAttempts.
|
override |
Check if any scales are set, and set the UseScales flag on or off; after that call the superclass' implementation
|
private |
Definition at line 154 of file elxStandardGradientDescent.h.
|
private |
Definition at line 158 of file elxStandardGradientDescent.h.
|
private |
Private variables for the sampling attempts.
Definition at line 157 of file elxStandardGradientDescent.h.
|
private |
Definition at line 159 of file elxStandardGradientDescent.h.
Generated on 2024-07-17 for elastix by 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) |