OpTorch API¶
optorch.Problem¶
-
class
optorch.
Problem
¶ A nonlinear optimization problem.
-
num_threads
¶ How many threads Ceres will use, both for evaluating the Jacobian and solving the linear system. Default is 1.
-
max_iterations
¶ Default is 10.
-
function_tolerance
¶ Default is float64 epsilon.
-
gradient_tolerance
¶ Default is float64 epsilon.
-
parameter_tolerance
¶ Default is float64 epsilon.
-
linear_solver
¶ One of (‘dense_qr’, ‘sparse_normal_cholesky’). Default is ‘dense_qr’.
-
add_residual
(cost_fn, *params)¶
-
set_local_parameterization
(param, name)¶ Sets the local parameterization for a parameter.
Supported parameterizations:
quat: Quaternion in [w,x,y,z] format
angle: Angle constrained to [-pi, pi)
- Parameters
name – One of (‘quat’, ‘angle’).
-
solve
(verbose=False, abort=False)¶
-