|View source on GitHub|
Conjugate gradient solver.
Compat aliases for migration
See Migration guide for more details.
tf.linalg.experimental.conjugate_gradient( operator, rhs, preconditioner=None, x=None, tol=1e-05, max_iter=20, name='conjugate_gradient' )
Solves a linear system of equations
A*x = rhs for self-adjoint, positive
A and right-hand side vector
rhs, using an iterative,
matrix-free algorithm where the action of the matrix A is represented by
operator. The iteration terminates when either the number of iterations
max_iter or when the residual norm has been reduced to
times its initial value, i.e. \(||rhs - A x_k|| <= tol ||rhs||\).
A possibly batched vector of shape