go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkStandardGradientDescentOptimizer.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright UMC Utrecht and contributors
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18
19#ifndef itkStandardGradientDescentOptimizer_h
20#define itkStandardGradientDescentOptimizer_h
21
23
24namespace itk
25{
26
66{
67public:
69
73
74 using Pointer = SmartPointer<Self>;
75 using ConstPointer = SmartPointer<const Self>;
76
78 itkNewMacro(Self);
79
82
84 using Superclass::MeasureType;
85 using Superclass::ParametersType;
86 using Superclass::DerivativeType;
87 using Superclass::CostFunctionType;
92
94 itkSetMacro(Param_a, double);
95 itkGetConstMacro(Param_a, double);
96
98 itkSetMacro(Param_A, double);
99 itkGetConstMacro(Param_A, double);
100
102 itkSetMacro(Param_alpha, double);
103 itkGetConstMacro(Param_alpha, double);
104
107 void
108 AdvanceOneStep() override;
109
111 void
113
119 itkSetMacro(InitialTime, double);
120 itkGetConstMacro(InitialTime, double);
121
124 itkGetConstMacro(CurrentTime, double);
125
129 virtual void
131 {
132 this->m_CurrentTime = this->m_InitialTime;
133 }
134
135
136protected:
139
141 virtual double
142 Compute_a(double k) const;
143
148 virtual void
150
152 double m_CurrentTime{ 0.0 };
153
155 bool m_UseConstantStep{ false };
156
157private:
159 double m_Param_a{ 1.0 };
160 double m_Param_A{ 1.0 };
161 double m_Param_alpha{ 0.602 };
162
164 double m_InitialTime{ 0.0 };
165};
166
167} // end namespace itk
168
169#endif // end #ifndef itkStandardGradientDescentOptimizer_h
Implement a gradient descent optimizer.
A cost function that applies a scaling to another cost function.
This class implements a gradient descent optimizer with a decaying gain.
~StandardGradientDescentOptimizer() override=default
virtual double Compute_a(double k) const
ITK_DISALLOW_COPY_AND_MOVE(StandardGradientDescentOptimizer)


Generated on 2023-01-13 for elastix by doxygen 1.9.6 elastix logo