minres#
- deepinv.optim.utils.minres(A, b, init=None, max_iter=1e2, tol=1e-5, eps=1e-6, parallel_dim=0, verbose=False, precon=lambda x: ...)[source]#
Minimal Residual Method for solving symmetric equations.
Solves \(Ax=b\) with \(A\) symmetric using the MINRES algorithm:
Christopher C. Paige, Michael A. Saunders (1975). “Solution of sparse indefinite systems of linear equations”. SIAM Journal on Numerical Analysis. 12 (4): 617–629.
The method assumes that \(A\) is hermite. For more details see: https://en.wikipedia.org/wiki/Minimal_residual_method
Based on cornellius-gp/linear_operator Modifications and simplifications for compatibility with deepinverse
- Parameters:
A (Callable) – Linear operator as a callable function.
b (torch.Tensor) – input tensor of shape (B, …)
init (torch.Tensor) – Optional initial guess.
max_iter (int) – maximum number of MINRES iterations.
tol (float) – absolute tolerance for stopping the MINRES algorithm.
parallel_dim (None, int, List[int]) – dimensions to be considered as batch dimensions. If None, all dimensions are considered as batch dimensions.
verbose (bool) – Output progress information in the console.
precon (Callable) – preconditioner is a callable function (not tested). Must be positive definite
- Returns:
(
torch.Tensor
) \(x\) of shape (B, …)