18 #ifndef itkRegularStepGradientDescentOptimizerv4_h
19 #define itkRegularStepGradientDescentOptimizerv4_h
46 template <
typename TInternalComputationValueType =
double>
70 using typename Superclass::DerivativeType;
73 using typename Superclass::MeasureType;
74 using typename Superclass::IndexRangeType;
75 using typename Superclass::ScalesType;
76 using typename Superclass::ParametersType;
90 itkSetMacro(MinimumStepLength, TInternalComputationValueType);
91 itkGetConstReferenceMacro(MinimumStepLength, TInternalComputationValueType);
95 itkSetMacro(RelaxationFactor, TInternalComputationValueType);
96 itkGetConstReferenceMacro(RelaxationFactor, TInternalComputationValueType);
100 itkSetMacro(GradientMagnitudeTolerance, TInternalComputationValueType);
101 itkGetConstReferenceMacro(GradientMagnitudeTolerance, TInternalComputationValueType);
105 itkSetMacro(CurrentLearningRateRelaxation,
MeasureType);
106 itkGetConstReferenceMacro(CurrentLearningRateRelaxation,
MeasureType);
111 StartOptimization(
bool doOnlyInitialization =
false)
override;
115 EstimateLearningRate()
override;
119 GetCurrentStepLength()
const;
125 AdvanceOneStep()
override;
129 ModifyGradientByScalesOverSubRange(
const IndexRangeType & subrange)
override;
131 ModifyGradientByLearningRateOverSubRange(
const IndexRangeType & subrange)
override;
142 PrintSelf(std::ostream & os,
Indent indent)
const override;
146 TInternalComputationValueType m_RelaxationFactor{};
148 TInternalComputationValueType m_MinimumStepLength{};
150 TInternalComputationValueType m_GradientMagnitudeTolerance{};
157 #ifndef ITK_MANUAL_INSTANTIATION
158 # include "itkRegularStepGradientDescentOptimizerv4.hxx"