I am trying to optimize a function that makes a call to a library I have made. I am trying to get Ceres to evaluate the cost function as little as possible. I have my cost function print out the parameter value its trying for "c" however, no matter what i set the numeric_derivative_relative_step_size to, it takes the same small step each time ~ 1e-3 which is way too small.
How do I fix this?
Isaac
ceres::NumericDiffCostFunction<SpeedOfSoundObjectiveFunction, ceres::CENTRAL, 1, 1>* cost_function
= new ceres::NumericDiffCostFunction<SpeedOfSoundObjectiveFunction, ceres::CENTRAL, 1, 1>(new SpeedOfSoundObjectiveFunction(this, pGpuData, pGpuTemp, &motion));
Float64 c = motion.speedOfSound;
ceres::Problem problem;
problem.AddResidualBlock(cost_function, NULL, &c);
const Float64 maxSpeedOfSoundError = 0.05;
//problem.SetParameterLowerBound(&c, 0, motion.speedOfSound - motion.speedOfSound*maxSpeedOfSoundError);
//problem.SetParameterUpperBound(&c, 0, motion.speedOfSound + motion.speedOfSound*maxSpeedOfSoundError);
ceres::Solver::Options options;
ceres::Solver::Summary summary;
options.minimizer_type = ceres::TRUST_REGION;
options.numeric_derivative_relative_step_size = 1e10;
options.linear_solver_type = ceres::DENSE_QR;
options.initial_trust_region_radius = 1e1;
options.num_linear_solver_threads = 1;
options.num_threads = 1;
options.max_num_iterations = 30;
options.minimizer_progress_to_stdout = true;
//options.logging_type = ceres::SILENT;
ceres::Solve(options, &problem, &summary);