18 #ifndef itkGradientDescentOptimizer_h
19 #define itkGradientDescentOptimizer_h
23 #include "ITKOptimizersExport.h"
44 extern ITKOptimizers_EXPORT std::ostream &
91 #if !defined(ITK_LEGACY_REMOVE)
95 StopConditionGradientDescentOptimizerEnum::MaximumNumberOfIterations;
97 StopConditionGradientDescentOptimizerEnum::MetricError;
101 itkGetConstReferenceMacro(Maximize,
bool);
102 itkSetMacro(Maximize,
bool);
103 itkBooleanMacro(Maximize);
112 this->SetMaximize(!v);
132 StartOptimization()
override;
137 ResumeOptimization();
145 itkSetMacro(LearningRate,
double);
148 itkGetConstReferenceMacro(LearningRate,
double);
154 itkGetConstReferenceMacro(NumberOfIterations,
SizeValueType);
160 itkGetConstReferenceMacro(Value,
double);
163 itkGetConstReferenceMacro(
StopCondition, StopConditionGradientDescentOptimizerEnum);
165 GetStopConditionDescription()
const override;
169 itkGetConstReferenceMacro(Gradient, DerivativeType);
175 PrintSelf(std::ostream & os,
Indent indent)
const override;
180 bool m_Maximize{
false };
182 double m_LearningRate{ 1.0 };
185 bool m_Stop{
false };
186 double m_Value{ 0.0 };
188 StopConditionGradientDescentOptimizerEnum::MaximumNumberOfIterations
192 std::ostringstream m_StopConditionDescription{};
196 extern ITKOptimizers_EXPORT std::ostream &