[Developers] trying to compare autodif with cppad

Kasper Kristensen kaskr at dtu.dk
Sat Aug 16 23:55:57 PDT 2014


Hi Dave,

Sorry for re-posting my comments - forgot to cc to developer list.

Comments to test case:
1. cppad version: Avoid creating a tape with numerical overflows by inserting valid parameters for the tape creation. Or easier: remove the line "det = Scalar( signdet ) * exp( logdet );" to get rid of the overflows (NaNs in the gradient).
2. The cppad version runs out of memory because this example tape on the order of n^3 floating point operations. The admb version avoids this by using adjoint code I believe. Similar tricks would have to be applied to cppad in order to make this example run for large n (you can hand code your own derivatives using cppad's concept of 'user atomic functions').
3. It would be interesting to compare just the sweep performance for the two tools, that is just the lines "dw=f.Reverse(1,w);" and "gradcalc(n*n,g);".

Comment to this:
"I'm more worried
about how it seems to choke on a matrix a bit bigger than 300x300.  Question is  whether this is just
due to my naive implementation."
Yes - see point 2. You can reduce the tape size with "user atomic functions".

Kasper


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.admb-project.org/pipermail/developers/attachments/20140817/e8b1c0b8/attachment.html>


More information about the Developers mailing list