18 #ifndef itkGradientDescentOptimizerv4_h
19 #define itkGradientDescentOptimizerv4_h
76 template<
typename TInternalComputationValueType>
112 itkSetMacro(LearningRate, TInternalComputationValueType);
113 itkGetConstReferenceMacro(LearningRate, TInternalComputationValueType);
122 itkSetMacro(MaximumStepSizeInPhysicalUnits, TInternalComputationValueType);
123 itkGetConstReferenceMacro(MaximumStepSizeInPhysicalUnits, TInternalComputationValueType);
133 itkSetMacro(DoEstimateLearningRateAtEachIteration,
bool);
134 itkGetConstReferenceMacro(DoEstimateLearningRateAtEachIteration,
bool);
135 itkBooleanMacro(DoEstimateLearningRateAtEachIteration);
145 itkSetMacro(DoEstimateLearningRateOnce,
bool);
146 itkGetConstReferenceMacro(DoEstimateLearningRateOnce,
bool);
147 itkBooleanMacro(DoEstimateLearningRateOnce);
159 itkSetMacro(MinimumConvergenceValue, TInternalComputationValueType);
174 itkGetConstReferenceMacro( ConvergenceValue, TInternalComputationValueType);
187 itkSetMacro(ReturnBestParametersAndValue,
bool);
188 itkGetConstReferenceMacro(ReturnBestParametersAndValue,
bool);
189 itkBooleanMacro(ReturnBestParametersAndValue);
193 void StartOptimization(
bool doOnlyInitialization =
false )
override;
196 void StopOptimization()
override;
199 void ResumeOptimization()
override;
202 virtual void EstimateLearningRate();
208 virtual void AdvanceOneStep();
211 void ModifyGradientByScalesOverSubRange(
const IndexRangeType& subrange )
override;
214 void ModifyGradientByLearningRateOverSubRange(
const IndexRangeType& subrange )
override;
222 void PrintSelf( std::ostream & os,
Indent indent )
const override;
233 bool m_ReturnBestParametersAndValue{
false };
251 #ifndef ITK_MANUAL_INSTANTIATION
252 #include "itkGradientDescentOptimizerv4.hxx"
TInternalComputationValueType m_LearningRate
Light weight base class for most itk classes.
TInternalComputationValueType m_ConvergenceValue
unsigned long SizeValueType
typename Superclass::ParametersType ParametersType
typename Superclass::ScalesType ScalesType
TInternalComputationValueType InternalComputationValueType
typename Superclass::MeasureType MeasureType
ParametersType m_BestParameters
MeasureType m_CurrentBestValue
Control indentation during Print() invocation.
typename Superclass::DerivativeType DerivativeType
TInternalComputationValueType m_MinimumConvergenceValue
Gradient descent optimizer.
DerivativeType m_PreviousGradient
ThreadedIndexedContainerPartitioner::IndexRangeType IndexRangeType