18#ifndef elxPreconditionedStochasticGradientDescent_h
19#define elxPreconditionedStochasticGradientDescent_h
29#include "itkMersenneTwisterRandomVariateGenerator.h"
177template <
class TElastix>
205 using Superclass1::CostFunctionType;
206 using Superclass1::CostFunctionPointer;
216 using typename Superclass1::ParametersType;
266 itkSetMacro(AutomaticParameterEstimation,
bool);
267 itkGetConstMacro(AutomaticParameterEstimation,
bool);
270 itkSetMacro(MaximumStepLength,
double);
271 itkGetConstReferenceMacro(MaximumStepLength,
double);
274 itkSetClampMacro(RegularizationKappa,
double, 0.0, 1.0);
275 itkGetConstReferenceMacro(RegularizationKappa,
double);
414#ifndef ITK_MANUAL_INSTANTIATION
415# include "elxPreconditionedStochasticGradientDescent.hxx"
This class is the elastix base class for all Optimizers.
typename ElastixType::RegistrationBaseType RegistrationType
itk::Optimizer ITKBaseType
typename std::vector< SettingsType > SettingsVectorType
typename ITKBaseType::ParametersType ParametersType
A gradient descent optimizer with an adaptive gain.
typename Superclass2::ITKBaseType ITKBaseType
typename TransformType::ScalarType CoordinateRepresentationType
SizeValueType m_NumberOfBandStructureSamples
SizeValueType m_MaxBandCovSize
void ResumeOptimization() override
typename ImageRandomCoordinateSamplerType::Pointer ImageRandomCoordinateSamplerPointer
void StartOptimization() override
typename FixedImageType::PointType FixedImagePointType
virtual void GetScaledDerivativeWithExceptionHandling(const ParametersType ¶meters, DerivativeType &derivative)
PreconditionedStochasticGradientDescent()
itk::SizeValueType SizeValueType
void BeforeRegistration() override
typename RegistrationType::MovingImageType MovingImageType
SizeValueType m_NumberOfJacobianMeasurements
typename ImageSamplerBaseType::Pointer ImageSamplerBasePointer
typename JacobianType::ValueType JacobianValueType
itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension)
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
typename PreconditionerEstimationType::Pointer PreconditionerEstimationPointer
~PreconditionedStochasticGradientDescent() override=default
SizeValueType m_NumberOfGradientMeasurements
typename AdvancedBSplineDeformableTransformType::Pointer BSplineTransformBasePointer
typename FixedImageType::RegionType FixedImageRegionType
typename RandomGeneratorType::Pointer RandomGeneratorPointer
virtual void SampleGradients(const ParametersType &mu0, double perturbationSigma, double &gg, double &ee)
double m_RegularizationKappa
typename RegistrationType::FixedImageType FixedImageType
typename itkRegistrationType::TransformType TransformType
typename AdvancedTransformType::Pointer AdvancedTransformPointer
SizeValueType m_NumberOfSpatialSamples
SizeValueType m_PreviousErrorAtIteration
bool m_AutomaticParameterEstimation
typename ElastixType::FixedImageType OutputImageType
SettingsVectorType m_SettingsVector
typename FixedImageType::IndexType FixedImageIndexType
bool m_UseNoiseCompensation
SizeValueType m_MaximumNumberOfSamplingAttempts
RandomGeneratorPointer m_RandomGenerator
typename ImageRandomSamplerBaseType::Pointer ImageRandomSamplerBasePointer
virtual void AutomaticPreconditionerEstimation()
bool m_OriginalButSigmoidToDefault
itk::SmartPointer< const Self > ConstPointer
itk::SmartPointer< Self > Pointer
typename ImageGridSamplerType::ImageSampleContainerType ImageSampleContainerType
typename ImageGridSamplerType::Pointer ImageGridSamplerPointer
ITK_DISALLOW_COPY_AND_MOVE(PreconditionedStochasticGradientDescent)
elxClassNameMacro("PreconditionedStochasticGradientDescent")
JacobianType TransformJacobianType
typename std::vector< SettingsType > SettingsVectorType
double m_SigmoidScaleFactor
double m_MaximumStepLengthRatio
void AdvanceOneStep() override
SizeValueType m_NumberOfSamplesForPrecondition
void AfterEachIteration() override
AdvancedTransformPointer m_AdvancedTransform
SizeValueType m_CurrentNumberOfSamplingAttempts
itk::Statistics::MersenneTwisterRandomVariateGenerator RandomGeneratorType
void AfterRegistration() override
SizeValueType m_NumberOfSamplesForNoiseCompensationFactor
typename TransformType::JacobianType JacobianType
bool m_AutomaticParameterEstimationDone
void MetricErrorResponse(itk::ExceptionObject &err) override
double m_MaximumStepLength
virtual void AddRandomPerturbation(ParametersType ¶meters, double sigma)
void BeforeEachResolution() override
typename AdvancedTransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
typename ImageRandomSamplerType::Pointer ImageRandomSamplerPointer
void AfterEachResolution() override
typename ImageSampleContainerType::Pointer ImageSampleContainerPointer
typename RegistrationType::ITKBaseType itkRegistrationType
This is a helper class for the automatic parameter estimation of the ASGD optimizer.
This is a helper class for the automatic estimation of a preconditioner for the FPSGD optimizer....
Samples image voxels on a regular grid.
Samples an image by randomly composing a set of physical coordinates.
This class is a base class for any image sampler that randomly picks samples.
Samples randomly some voxels of an image.
This class is a base class for any image sampler.
This class implements a gradient descent optimizer with adaptive gain.
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.