On Thu, Dec 20, 2018 at 1:34 AM Raffi Enficiaud via Boost < boost@lists.boost.org> wrote:
it supports only compilation time expressions, is that correct? Would it be possible to construct expressions at runtime and then call the autodiff on that expression? I believe this would make the library extremely useful and comparable to whatever tensorflow or caffe have
Let's say one is interested in calculating the first 3 derivatives of a
function f(x) with respect to x, and for a particular computation, the
value of x is 10. The 3 must be known at compile-time, but the 10 can be
decided at runtime:
autodiff::variable
- does it handle vector/arrays/matrices already? It happens often that we have a vector function returning eg. an array, and we want the differential wrt. one element of that array. Same for matrices.
It does not directly included matrix multiplication, if that is what you are asking. However if each element of a matrix can be an autodiff::variable<> then the existing matrix multiplication logic should use the overloaded autodiff operator*() and it should all work. For example, calls are make to std::inner_product() in which the internal multiplication is calling the overloaded autodiff operator*(). Matt