{ }
View source on GitHub |
Conjugate gradient solver.
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
definite matrix 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
exceeds max_iter
or when the residual norm has been reduced to tol
times its initial value, i.e. \(||rhs - A x_k|| <= tol ||rhs||\).