The solution to a nonlinear solve.
value: The solution to the solve.
result: An integer representing whether the solve was successful or not. This can be converted into a human-readable error message via
aux: Any user-specified auxiliary data returned from the problem; defaults to
Noneif there is no auxiliary data. Auxiliary outputs can be captured by setting a
optx.root_find(fn, ..., has_aux=True).
stats: Statistics about the solve, e.g. the number of steps that were required.
state: The final internal state of the solver. The meaning of this is specific to each solver.
An enumeration, with the following entries:
max_steps_reached: The maximum number of solver steps was reached. Try increasing
singular: The linear solver returned non-finite (NaN or inf) output. This usually means that the operator was not well-posed, and that the solver does not support this.
If you are trying solve a linear least-squares problem then you should pass
solver=AutoLinearSolver(well_posed=False). By default
lineax.linear_solveassumes that the operator is square and nonsingular.
If you were expecting this solver to work with this operator, then it may be because:
(a) the operator is singular, and your code has a bug; or
(b) the operator was nearly singular (i.e. it had a high condition number:
jnp.linalg.cond(operator.as_matrix())is large), and the solver suffered from numerical instability issues; or
(c) the operator is declared to exhibit a certain property (e.g. positive definiteness) that is does not actually satisfy.
breakdown: A form of iterative breakdown has occured in the linear solve. Try using a different solver for this problem or increase
restartif using GMRES.
stagnation: A stagnation in an iterative linear solve has occurred. Try increasing
nonlinear_max_steps_reached: The maximum number of steps was reached in the nonlinear solver. The problem may not be solveable (e.g., a root-find on a function that has no roots), or you may need to increase
nonlinear_divergence: Nonlinear solve diverged.