commit | ac3b8e82175122e38bafaaa9cd419ba3cee11087 | [log] [tgz] |
---|---|---|
author | David Gossow <dgossow@google.com> | Fri Apr 29 16:07:11 2016 +0200 |
committer | Sameer Agarwal <sameeragarwal@google.com> | Thu Aug 18 06:18:43 2016 +0000 |
tree | 90c50823d8842aab51402c97b7098ccb028cd58e | |
parent | d4264ec10d9a270b53b5db86c0245ae8cbd2cf18 [diff] |
Gradient checking cleanup and local parameterization bugfix Change the Ceres gradient checking API to make is useful for unit testing, clean up code duplication and fix interaction between gradient checking and local parameterizations. There were two gradient checking implementations, one being used when using the check_gradients flag in the Solver, the other being a standalone class. The standalone version was restricted to cost functions with fixed parameter sizes at compile time, which is being lifted here. This enables it to be used inside the GradientCheckingCostFunction as well. In addition, this installs new hooks in the Solver to ensure that Solve will fail if any incorrect gradients are detected. This way, you can set the check_gradient flags to true and detect errors in an automated way, instead of just printing error information to the log. The error log is now also returned in the Solver summary instead of being printed directly. The user can then decide what to do with it. The existing hooks for user callbacks are used for this purpose to keep the internal API changes minimal and non-invasive. The last and biggest change is the way the the interaction between local parameterizations and the gradient checker works. Before, local parameterizations would be ignored by the checker. However, if a cost function does not compute its Jacobian along the null space of the local parameterization, this wil not have any effect on the solver, but would result in a gradient checker error. With this change, the Jacobians are multiplied by the Jacobians of the respective local parameterization and thus being compared in the tangent space only. The typical use case for this are quaternion parameters, where a cost function will typically assume that the quaternion is always normalized, skipping the correct computation of the Jacobian along the normal to save computation cost. Change-Id: I5e1bb97b8a899436cea25101efe5011b0bb13282
Ceres Solver is an open source C++ library for modeling and solving large, complicated optimization problems. It is a feature rich, mature and performant library which has been used in production at Google since 2010. Ceres Solver can solve two kinds of problems.
Please see ceres-solver.org for more information.
Ceres development happens on Gerrit, including both repository hosting and code reviews. The GitHub Repository is a continuously updated mirror which is primarily meant for issue tracking. Please see our Contributing to Ceres Guide for more details.
The upstream Gerrit repository is
https://ceres-solver.googlesource.com/ceres-solver