[Insight-users] regular step gradient descent optimizer - getvalueand derivative not used

Luis Ibanez luis.ibanez at kitware.com
Sat Jan 8 22:05:24 EST 2005


Hi Tom,

Thanks a lot for your suggestion.

This change can indeed increase the performance of registration
methods for all those metrics that compute value and derivatives
simultaneously. For example, Mutual Information.


The change that you suggested has been committed into
the CVS repository:
http://www.itk.org/cgi-bin/viewcvs.cgi/Code/Numerics/itkRegularStepGradientDescentBaseOptimizer.cxx?root=Insight&sortby=date&r2=1.18&r1=1.17


along with the corresponding credits:
http://www.itk.org/cgi-bin/viewcvs.cgi/Code/Numerics/itkRegularStepGradientDescentBaseOptimizer.cxx?rev=1.18&root=Insight&sortby=date&view=log




Please let us know if you have any other suggestions for
improvements.


    Thanks


       Luis



-------------------------------------------------------------
Tom Vercauteren wrote:

> Hi all,
> 
> While going through the code of an optimization routine I realized
> that the regular step gradient descent optimizer uses the following
> code (in itkRegularStepGradientDescentBaseOptimizer.txx):
> /////////////////////
> ParametersType currentPosition = this->GetCurrentPosition();
> m_Value = m_CostFunction->GetValue( currentPosition );
> 
> if( m_Stop )
>   {
>   break;
>   }
> 
> m_PreviousGradient = m_Gradient;
> m_CostFunction->GetDerivative( currentPosition, m_Gradient );
> 
> if( m_Stop )
>   {
>   break;
>   }
> //////////////////
> I am not sure to get it right but I thought it would be better to use
> m_CostFunction->GetValueAndDerivative(...) because GetValue and
> GetDerivative often share similar code.
> Am I missing something here?
> 
> Thanks for your answers,
> Tom
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 
> 






More information about the Insight-users mailing list