29#include "itkMersenneTwisterRandomVariateGenerator.h"
189template <
class TElastix>
208 itkTypeMacro(
AdaGrad, VoxelWiseASGDOptimizer);
217 using Superclass1::CostFunctionType;
218 using Superclass1::CostFunctionPointer;
228 using typename Superclass1::ParametersType;
278 itkSetMacro(AutomaticParameterEstimation,
bool);
279 itkGetConstMacro(AutomaticParameterEstimation,
bool);
282 itkSetMacro(MaximumStepLength,
double);
283 itkGetConstReferenceMacro(MaximumStepLength,
double);
286 itkSetClampMacro(RegularizationKappa,
double, 0.0, 1.0);
287 itkGetConstReferenceMacro(RegularizationKappa,
double);
427#ifndef ITK_MANUAL_INSTANTIATION
428# include "elxAdaGrad.hxx"
A gradient descent optimizer with an adaptive gain.
double m_RegularizationKappa
virtual void AutomaticPreconditionerEstimation()
itk::SmartPointer< Self > Pointer
typename AdvancedTransformType::Pointer AdvancedTransformPointer
virtual void AddRandomPerturbation(ParametersType ¶meters, double sigma)
SizeValueType m_MaxBandCovSize
bool m_AutomaticParameterEstimationDone
typename ImageRandomSamplerType::Pointer ImageRandomSamplerPointer
void MetricErrorResponse(itk::ExceptionObject &err) override
SizeValueType m_NumberOfSamplesForPrecondition
typename JacobianType::ValueType JacobianValueType
elxClassNameMacro("AdaGrad")
AdvancedTransformPointer m_AdvancedTransform
typename ImageGridSamplerType::Pointer ImageGridSamplerPointer
void AfterEachIteration() override
double m_SigmoidScaleFactor
typename RandomGeneratorType::Pointer RandomGeneratorPointer
bool m_AutomaticParameterEstimation
SizeValueType m_NumberOfSamplesForNoiseCompensationFactor
typename AdvancedTransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
itk::SmartPointer< const Self > ConstPointer
typename TransformType::ScalarType CoordinateRepresentationType
typename RegistrationType::ITKBaseType itkRegistrationType
typename itkRegistrationType::TransformType TransformType
void BeforeEachResolution() override
virtual void GetScaledDerivativeWithExceptionHandling(const ParametersType ¶meters, DerivativeType &derivative)
void BeforeRegistration() override
SizeValueType m_NumberOfJacobianMeasurements
typename RegistrationType::FixedImageType FixedImageType
itk::Statistics::MersenneTwisterRandomVariateGenerator RandomGeneratorType
SizeValueType m_NumberOfGradientMeasurements
void ResumeOptimization() override
typename PreconditionerEstimationType::Pointer PreconditionerEstimationPointer
typename RegistrationType::MovingImageType MovingImageType
double m_MaximumStepLengthRatio
bool m_OriginalButSigmoidToDefault
itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension)
typename ElastixType::FixedImageType OutputImageType
RandomGeneratorPointer m_RandomGenerator
SizeValueType m_MaximumNumberOfSamplingAttempts
typename FixedImageType::RegionType FixedImageRegionType
typename ImageSamplerBaseType::Pointer ImageSamplerBasePointer
void AdvanceOneStep() override
typename ImageRandomSamplerBaseType::Pointer ImageRandomSamplerBasePointer
typename ImageSampleContainerType::Pointer ImageSampleContainerPointer
typename std::vector< SettingsType > SettingsVectorType
SizeValueType m_PreviousErrorAtIteration
double m_MaximumStepLength
typename ImageRandomCoordinateSamplerType::Pointer ImageRandomCoordinateSamplerPointer
SizeValueType m_NumberOfBandStructureSamples
SettingsVectorType m_SettingsVector
itk::SizeValueType SizeValueType
typename AdvancedBSplineDeformableTransformType::Pointer BSplineTransformBasePointer
typename FixedImageType::IndexType FixedImageIndexType
SizeValueType m_CurrentNumberOfSamplingAttempts
ITK_DISALLOW_COPY_AND_MOVE(AdaGrad)
typename Superclass2::ITKBaseType ITKBaseType
void AfterRegistration() override
typename TransformType::JacobianType JacobianType
JacobianType TransformJacobianType
typename FixedImageType::PointType FixedImagePointType
SizeValueType m_NumberOfSpatialSamples
typename ImageGridSamplerType::ImageSampleContainerType ImageSampleContainerType
bool m_UseNoiseCompensation
void AfterEachResolution() override
~AdaGrad() override=default
virtual void SampleGradients(const ParametersType &mu0, double perturbationSigma, double &gg, double &ee)
void StartOptimization() override
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
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
This class implements a gradient descent optimizer with adaptive gain.
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.
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.