eigen matrix inverse inside autodiff cost function

315 views
Skip to first unread message

Maor Peretz

unread,
Apr 12, 2016, 4:47:26 AM4/12/16
to Ceres Solver
Hi, does any one know if its safe to use Eigen matrix inverse when using it in autodiff cost function?
i tried it and didnt get any errors plus the results look reasonable most of the time...
my suspicion raised when i saw this inside jet.h:
// Define the helper functions Eigen needs to embed Jet types.
//
// NOTE(keir): machine_epsilon() and precision() are missing, because they don't
// work with nested template types (e.g. where the scalar is itself templated).
// Among other things, this means that decompositions of Jet's does not work,
// for example
//
// Matrix<Jet<T, N> ... > A, x, b;
// ...
// A.solve(b, &x)
//
// does not work and will fail with a strange compiler error.
//
// TODO(keir): This is an Eigen 2.0 limitation that is lifted in 3.0. When we
// switch to 3.0, also add the rest of the specialization functionality.

Sameer Agarwal

unread,
Apr 12, 2016, 9:28:50 AM4/12/16
to Ceres Solver

I do not think so.
You are better off using inverse function theorem to evaluate the derivative in that case. The tips and tricks section of the Ceres documentation talks about this.


--
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/5741def1-d921-483e-ab27-a4771c06b609%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Maor Peretz

unread,
Apr 12, 2016, 9:37:14 AM4/12/16
to Ceres Solver
ill try it, thanks!
Reply all
Reply to author
Forward
0 new messages