pylops_gpu.optimization.cg.cg¶
-
pylops_gpu.optimization.cg.cg(A, y, x=None, niter=10, tol=1e-10)[source]¶ Conjugate gradient
Solve a system of equations given the square operator
Aand datayusing conjugate gradient iterations.Parameters: - A :
pylops_gpu.LinearOperator Operator to invert of size \([N \times N]\)
- y :
torch.Tensor Data of size \([N \times 1]\)
- x0 :
torch.Tensor, optional Initial guess
- niter :
int, optional Number of iterations
- tol :
int, optional Residual norm tolerance
Returns: - x :
torch.Tensor Estimated model
- iiter :
torch.Tensor Max number of iterations model
- A :