BachiLi / had

34 stars 3 forks source link

first derivatives only? #2

Closed stumarcus314 closed 7 years ago

stumarcus314 commented 7 years ago

If I only need to construct the gradient of a function, is HAD a good choice? Does HAD automatically construct the information needed to construct second derivatives, even if they are not needed?

BachiLi commented 7 years ago

Hi, HAD can be used for gradient computation only, but it is not as efficient as some other AD libraries. Currently HAD always propagates the second order information even if you only request first order ones. I would recommend Adept ( http://www.met.reading.ac.uk/clouds/adept/ ) if you only need first-order derivatives.