Hello all,
I am trying to solve an optimization problem (problem 1) where, for each residual block in problem 1, I have to solve another optimization problem (problem 2). This means that for each residual block of problem 1 a ceres::Problem is created and solved in order to get each one of the residual blocks of problem 1. What is the right differentiation to use in problem 1 (problem 2 uses 3rd party libraries that are not templated so I can only use Numeric differentiation for that one)? My current implementation of problem 1 uses numeric differentiation but this is extremely slow since, to get the jacobians of all the residual blocks of problem 1, problem 2 has to be solved many times for each residual block.
Thank you.