如何从scipy.minimize迁移到ceres-solver?

时间:2019-04-25 14:29:11

标签: c++ scipy ceres-solver

如何将以下代码重写为ceres-solver

我尝试遵循this tutorial,但看起来有些混乱。

from scipy.optimize import minimize
def target_func(point):
    total_mse = 0

    for equation in equations:
        x, y, z = equation

        denominator = linalg.norm(np.matmul(x, y))
        numerator = linalg.norm(
            np.cross(np.matmul(x, y),
                     point - z))

        equation_error = numerator / denominator
        total_mse += equation_error

    return total_mse * total_mse

res = minimize(target_func, x0, method='nelder-mead',
               options={'xtol': 1e-8})

0 个答案:

没有答案