torch_numopt.solve_system#

Linear system solvers for curvature matrices.

This module provides functions to solve H p = -g (or similar) for various representations of the curvature (full matrix, block diagonal, diagonal, scalar). It includes direct solvers (Cholesky, LU, pseudo-inverse, least-squares) and iterative solvers (conjugate gradient, conjugate residual, truncated CG).

Functions

conjugate_gradient(curvature_estimator, ...)

Solve H p = rhs using the conjugate gradient (CG) method.

conjugate_residual(curvature_estimator, ...)

Conjugate residual method for solving H p = rhs.

solve_system(curvature_estimator, objective, ...)

High-level solver that selects the appropriate method based on curvature representation and the requested solver.

truncated_cg(curvature_estimator, objective, rhs)

Truncated conjugate gradient method.