About Grape module

Feel free to talk about anything and everything in this board.
Post Reply
yunwei
Posts: 7
Joined: Wed Aug 11, 2021 5:39 am

About Grape module

Post by yunwei »

So is the grape module only for the first-order derivatives? Or it also contains second-order? Or user can set up
kuprov
Posts: 123
Joined: Mon Mar 29, 2021 4:26 pm

Re: About Grape module

Post by kuprov »

It has second order derivatives. Call it with four output parameters to get the Hessian:

http://spindynamics.org/wiki/index.php?title=Grape.m

The mathematics is described here:

https://aip.scitation.org/doi/10.1063/1.4949534
yunwei
Posts: 7
Joined: Wed Aug 11, 2021 5:39 am

Re: About Grape module

Post by yunwei »

I see. But can I choose to only use gradient optimization without the hessian?
kuprov
Posts: 123
Joined: Mon Mar 29, 2021 4:26 pm

Re: About Grape module

Post by kuprov »

We have taken that the pure gradient descent option out - its performance is always much inferior to BFGS. If for some reason you would like to force gradient descent (bad idea), call optimal control functions like grape_xy manually in a loop and use the gradients that they return to take a step manually.
Post Reply