[Insight-users] AdvanceOneStep in Class GradientDescentOptimizer(itkGradientDescentOptimizer.cpp)

Ashish Poddar ahpoddar at gmail.com
Sun May 1 15:50:58 EDT 2005


to make the space of parameters isometric.. so increment of x in some
direction would effect in a similar way as it would mean in other
direction..

regards,
Ashish.

On 5/1/05, 庄吓海(Xiahai Zhuang) <arhye at 163.com> wrote:
> /**
>  * 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
>  
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 
> 
> 


-- 
Ashish Poddar
Have an acceptable reason for accepting anything.
Y:ashish_poddar | MSN:ashish_poddar at yahoo.com


More information about the Insight-users mailing list