[ADOL-C] Change parameters of a function without retaping
thomas.leitz at fau.de
Fri May 8 18:49:56 EDT 2015
lets assume I have a function f(x,y) : R^n \times R^m -> R and I only need the gradient with respect to x, but every time I need to change both variables x and y. (y could be some parameters like coefficients of a polynomial function etc.). There are basically two ways I know how to achieve this:
1. mark both x and y as independent variables, tape once and every time I need a gradient I compute the whole gradient df/d(x,y) at some (x0,y0) and just use df/dx (i.e. the first n values of the gradient df/d(x,y)). This way I can change both variables but I also compute the gradient df/dy that I don't need.
2. mark only x as independent and tape the function with any y0 every time before computing the gradient df/dx.
Is there any way to tape once, and later compute the gradient df/dx at any (x0,y0) without retaping?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ADOL-C