[Insight-users] AdvanceOneStep in
ClassGradientDescentOptimizer(itkGradientDescentOptimizer.cpp)
Karthik Krishnan
karthik.krishnan at kitware.com
Sun May 1 10:57:11 EDT 2005
Cause different parameters might have different degrees of influence and the
scales are used to dictate those degrees. So a large scale for a paramter
will restrict influence of that parameter. See Page 268 of the
SoftwareGuide2.0 at http://itk.org/HTML/Documentation.htm
Thanks
kk
-----Original Message-----
From: insight-users-bounces at itk.org
[mailto:insight-users-bounces at itk.org]On Behalf Of 庄吓海(Xiahai Zhuang)
Sent: Sunday, May 01, 2005 5:00 AM
To: insight-users at itk.org
Subject: [Insight-users] AdvanceOneStep in
ClassGradientDescentOptimizer(itkGradientDescentOptimizer.cpp)
/**
* Advance one Step following the gradient direction
*/
typedef Array< double> ParametersType;
ParametersType m_currentPosition;
void
GradientDescentOptimizer
::AdvanceOneStep( void )
{
itkDebugMacro("AdvanceOneStep");
.....
ScalesType scales = this-> GetScales();
...
DerivativeType transformedGradient( spaceDimension );
for(unsigned int j = 0; j < spaceDimension; j++)
{
transformedGradient[j] = m_Gradient[j] / scales[j];
//?????????????????????? why here takes a (/scales[j])
}
//as in method m_CostFunction-> GetValueAndDerivative(this->
GetCurrentPosition(), m_Value, m_Gradient )m_Gradient derivative
// m_Gradient is the derivative of MutualInformation with respect to
transform parameters,
// why transformedGradient[j] = m_Gradient[j] / scales[j];
ParametersType newPosition( spaceDimension );
for(unsigned int j = 0; j < spaceDimension; j++)
{
newPosition[j] = currentPosition[j] +
direction * m_LearningRate * transformedGradient[j];
}
this-> SetCurrentPosition( newPosition );
this-> InvokeEvent( IterationEvent() );
}
致
礼!
庄吓海(Xiahai Zhuang)
arhye at 163.com
2005-05-01
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20050501/51db1ba2/attachment.html
More information about the Insight-users
mailing list