Loading...
Searching...
No Matches
itkStandardStochasticGradientDescentOptimizer.h
Go to the documentation of this file.
/*=========================================================================
*
* Copyright UMC Utrecht and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
#ifndef itkStandardStochasticGradientOptimizer_h
#define itkStandardStochasticGradientOptimizer_h
#include "itkStochasticGradientDescentOptimizer.h"
namespace itk
{
class StandardStochasticGradientOptimizer : public StochasticGradientDescentOptimizer
{
public:
ITK_DISALLOW_COPY_AND_MOVE(StandardStochasticGradientOptimizer);
using Self = StandardStochasticGradientOptimizer;
using Superclass = StochasticGradientDescentOptimizer;
using Pointer = SmartPointer<Self>;
using ConstPointer = SmartPointer<const Self>;
itkNewMacro(Self);
itkTypeMacro(StandardStochasticGradientOptimizer, StochasticGradientDescentOptimizer);
using Superclass::MeasureType;
using Superclass::ParametersType;
using Superclass::DerivativeType;
using Superclass::CostFunctionType;
using Superclass::ScalesType;
using Superclass::ScaledCostFunctionType;
using Superclass::ScaledCostFunctionPointer;
using Superclass::StopConditionType;
itkSetMacro(Param_a, double);
itkGetConstMacro(Param_a, double);
itkSetMacro(Param_beta, double);
itkGetConstMacro(Param_beta, double);
itkSetMacro(Param_A, double);
itkGetConstMacro(Param_A, double);
itkSetMacro(Param_alpha, double);
itkGetConstMacro(Param_alpha, double);
void
AdvanceOneStep() override;
void
StartOptimization() override;
itkSetMacro(InitialTime, double);
itkGetConstMacro(InitialTime, double);
itkGetConstMacro(CurrentTime, double);
virtual void
ResetCurrentTimeToInitialTime()
{
this->m_CurrentTime = this->m_InitialTime;
}
protected:
StandardStochasticGradientOptimizer();
~StandardStochasticGradientOptimizer() override = default;
virtual double
Compute_a(double k) const;
virtual double
Compute_beta(double k) const;
virtual void
UpdateCurrentTime();
double m_CurrentTime{ 0.0 };
bool m_UseConstantStep{};
private:
double m_Param_a{ 1.0 };
double m_Param_beta{};
double m_Param_A{ 1.0 };
double m_Param_alpha{ 0.602 };
double m_InitialTime{ 0.0 };
}; // end class StandardStochasticGradientOptimizer
} // end namespace itk
#endif // end #ifndef itkStandardStochasticGradientOptimizer_h
itk::StandardStochasticGradientOptimizer::Compute_beta
virtual double Compute_beta(double k) const
itk::StandardStochasticGradientOptimizer::m_UseConstantStep
bool m_UseConstantStep
Definition itkStandardStochasticGradientDescentOptimizer.h:160
itk::StandardStochasticGradientOptimizer::m_Param_A
double m_Param_A
Definition itkStandardStochasticGradientDescentOptimizer.h:166
itk::StandardStochasticGradientOptimizer::Self
StandardStochasticGradientOptimizer Self
Definition itkStandardStochasticGradientDescentOptimizer.h:70
itk::StandardStochasticGradientOptimizer::m_Param_beta
double m_Param_beta
Definition itkStandardStochasticGradientDescentOptimizer.h:165
itk::StandardStochasticGradientOptimizer::ConstPointer
SmartPointer< const Self > ConstPointer
Definition itkStandardStochasticGradientDescentOptimizer.h:73
itk::StandardStochasticGradientOptimizer::m_Param_a
double m_Param_a
Definition itkStandardStochasticGradientDescentOptimizer.h:164
itk::StandardStochasticGradientOptimizer::Compute_a
virtual double Compute_a(double k) const
itk::StandardStochasticGradientOptimizer::ITK_DISALLOW_COPY_AND_MOVE
ITK_DISALLOW_COPY_AND_MOVE(StandardStochasticGradientOptimizer)
itk::StandardStochasticGradientOptimizer::m_InitialTime
double m_InitialTime
Definition itkStandardStochasticGradientDescentOptimizer.h:170
itk::StandardStochasticGradientOptimizer::StandardStochasticGradientOptimizer
StandardStochasticGradientOptimizer()
itk::StandardStochasticGradientOptimizer::m_CurrentTime
double m_CurrentTime
Definition itkStandardStochasticGradientDescentOptimizer.h:157
itk::StandardStochasticGradientOptimizer::~StandardStochasticGradientOptimizer
~StandardStochasticGradientOptimizer() override=default
itk::StandardStochasticGradientOptimizer::Superclass
StochasticGradientDescentOptimizer Superclass
Definition itkStandardStochasticGradientDescentOptimizer.h:71
itk::StandardStochasticGradientOptimizer::ResetCurrentTimeToInitialTime
virtual void ResetCurrentTimeToInitialTime()
Definition itkStandardStochasticGradientDescentOptimizer.h:132
itk::StandardStochasticGradientOptimizer::m_Param_alpha
double m_Param_alpha
Definition itkStandardStochasticGradientDescentOptimizer.h:167
itk::StandardStochasticGradientOptimizer::UpdateCurrentTime
virtual void UpdateCurrentTime()
itk::StandardStochasticGradientOptimizer::Pointer
SmartPointer< Self > Pointer
Definition itkStandardStochasticGradientDescentOptimizer.h:72
itk::StandardStochasticGradientOptimizer::StartOptimization
void StartOptimization() override
itk::StandardStochasticGradientOptimizer::AdvanceOneStep
void AdvanceOneStep() override
itk::StochasticGradientDescentOptimizer::StopConditionType
StopConditionType
Definition itkStochasticGradientDescentOptimizer.h:83
itk::StochasticGradientDescentOptimizer::StochasticGradientDescentOptimizer
StochasticGradientDescentOptimizer()
itk::StochasticGradientDescentOptimizer::ScaledCostFunctionPointer
ScaledCostFunctionType::Pointer ScaledCostFunctionPointer
Definition itkScaledSingleValuedNonLinearOptimizer.h:87
itk::StochasticGradientDescentOptimizer::ScalesType
NonLinearOptimizer::ScalesType ScalesType
Definition itkScaledSingleValuedNonLinearOptimizer.h:85
itk::StochasticGradientDescentOptimizer::ScaledCostFunctionType
ScaledSingleValuedCostFunction ScaledCostFunctionType
Definition itkScaledSingleValuedNonLinearOptimizer.h:86
itkStochasticGradientDescentOptimizer.h
itk
Definition itkAdvancedImageToImageMetric.h:43

Generated on 1768596610 for elastix by 1.15.0 |