18#ifndef __itkStochasticGradientDescentOptimizer_h
19#define __itkStochasticGradientDescentOptimizer_h
22#include "itkPlatformMultiThreader.h"
108 itkSetMacro( LearningRate,
double );
111 itkGetConstReferenceMacro( LearningRate,
double );
114 itkSetMacro( NumberOfIterations,
unsigned long );
117 itkGetConstMacro( LBFGSMemory,
unsigned int );
120 itkGetConstReferenceMacro( NumberOfIterations,
unsigned long );
123 itkGetConstReferenceMacro( NumberOfInnerIterations,
unsigned long );
126 itkGetConstMacro( CurrentIteration,
unsigned int );
129 itkGetConstMacro( CurrentInnerIteration,
unsigned int );
132 itkGetConstReferenceMacro( Value,
double );
158 this->
m_Threader->SetNumberOfWorkUnits( numberOfThreads );
161 itkSetMacro( UseMultiThread,
bool );
163 itkSetMacro( UseOpenMP,
bool );
164 itkSetMacro( UseEigen,
bool );
169 void PrintSelf( std::ostream& os, Indent indent )
const override;
NonLinearOptimizer::ScalesType ScalesType
Superclass::ParametersType ParametersType
ScaledSingleValuedCostFunction ScaledCostFunctionType
Superclass::DerivativeType DerivativeType
ScaledCostFunctionType::Pointer ScaledCostFunctionPointer
Superclass::CostFunctionType CostFunctionType
Superclass::MeasureType MeasureType
Implement a gradient descent optimizer.
Superclass::ParametersType ParametersType
ParametersType m_PreviousSearchDir
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION AdvanceOneStepThreaderCallback(void *arg)
@ MaximumNumberOfIterations
@ GradientMagnitudeTolerance
ScaledSingleValuedNonLinearOptimizer Superclass
ParametersType m_SearchDir
SmartPointer< Self > Pointer
Superclass::ScaledCostFunctionType ScaledCostFunctionType
StochasticGradientDescentOptimizer()
void operator=(const Self &)
Superclass::DerivativeType DerivativeType
void PrintSelf(std::ostream &os, Indent indent) const override
virtual void AdvanceOneStep(void)
virtual void MetricErrorResponse(ExceptionObject &err)
virtual void ResumeOptimization(void)
DerivativeType m_PreviousGradient
StochasticGradientDescentOptimizer(const Self &)
StochasticGradientDescentOptimizer Self
StopConditionType m_StopCondition
Superclass::ScaledCostFunctionPointer ScaledCostFunctionPointer
SmartPointer< const Self > ConstPointer
ParametersType m_MeanSearchDir
Superclass::CostFunctionType CostFunctionType
unsigned long m_LBFGSMemory
unsigned long m_CurrentIteration
itk::PlatformMultiThreader ThreaderType
void StartOptimization(void) override
~StochasticGradientDescentOptimizer() override
Superclass::MeasureType MeasureType
void SetNumberOfWorkUnits(ThreadIdType numberOfThreads)
ParametersType m_PreviousPosition
DerivativeType m_PrePreviousGradient
ThreaderType::Pointer m_Threader
unsigned long m_NumberOfInnerIterations
virtual void StopOptimization(void)
unsigned long m_NumberOfIterations
ParametersType m_PrePreviousSearchDir
void ThreadedAdvanceOneStep(ThreadIdType threadId, ParametersType &newPosition)
unsigned long m_CurrentInnerIteration
ThreaderType::WorkUnitInfo ThreadInfoType
DerivativeType m_Gradient
Superclass::ScalesType ScalesType
ParametersType * t_NewPosition