go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkStandardStochasticGradientDescentOptimizer.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 itkStandardStochasticGradientOptimizer_h
20#define itkStandardStochasticGradientOptimizer_h
21
23
24namespace itk
25{
65{
66public:
68
72 using Pointer = SmartPointer<Self>;
73 using ConstPointer = SmartPointer<const Self>;
74
76 itkNewMacro(Self);
77
80
82 using Superclass::MeasureType;
83 using Superclass::ParametersType;
84 using Superclass::DerivativeType;
85 using Superclass::CostFunctionType;
90
92 itkSetMacro(Param_a, double);
93 itkGetConstMacro(Param_a, double);
94
96 itkSetMacro(Param_beta, double);
97 itkGetConstMacro(Param_beta, double);
98
100 itkSetMacro(Param_A, double);
101 itkGetConstMacro(Param_A, double);
102
104 itkSetMacro(Param_alpha, double);
105 itkGetConstMacro(Param_alpha, double);
106
109 void
110 AdvanceOneStep() override;
111
113 void
115
121 itkSetMacro(InitialTime, double);
122 itkGetConstMacro(InitialTime, double);
123
126 itkGetConstMacro(CurrentTime, double);
127
131 virtual void
136
137protected:
140
142 virtual double
143 Compute_a(double k) const;
144
146 virtual double
147 Compute_beta(double k) const;
148
153 virtual void
155
157 double m_CurrentTime{ 0.0 };
158
161
162private:
164 double m_Param_a{ 1.0 };
165 double m_Param_beta{};
166 double m_Param_A{ 1.0 };
167 double m_Param_alpha{ 0.602 };
168
170 double m_InitialTime{ 0.0 };
171
172}; // end class StandardStochasticGradientOptimizer
173
174
175} // end namespace itk
176
177
178#endif // end #ifndef itkStandardStochasticGradientOptimizer_h
A cost function that applies a scaling to another cost function.
This class implements a gradient descent optimizer with a decaying gain.
virtual double Compute_beta(double k) const
virtual double Compute_a(double k) const
ITK_DISALLOW_COPY_AND_MOVE(StandardStochasticGradientOptimizer)
~StandardStochasticGradientOptimizer() override=default


Generated on 2024-07-17 for elastix by doxygen 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) elastix logo