Aliases:
tf.linalg.triangular_solve
tf.matrix_triangular_solve
tf.linalg.triangular_solve(
matrix,
rhs,
lower=True,
adjoint=False,
name=None
)
Defined in generated file: tensorflow/python/ops/gen_linalg_ops.py
.
Solves systems of linear equations with upper or lower triangular matrices by
backsubstitution.
matrix
is a tensor of shape [..., M, M]
whose inner-most 2 dimensions form
square matrices. If lower
is True
then the strictly upper triangular part
of each inner-most matrix is assumed to be zero and not accessed.
If lower
is False then the strictly lower triangular part of each inner-most
matrix is assumed to be zero and not accessed.
rhs
is a tensor of shape [..., M, K]
.
The output is a tensor of shape [..., M, K]
. If adjoint
is
True
then the innermost matrices in output
satisfy matrix equations
matrix[..., :, :] * output[..., :, :] = rhs[..., :, :]
.
If adjoint
is False
then the strictly then the innermost matrices in
output
satisfy matrix equations
adjoint(matrix[..., i, k]) * output[..., k, j] = rhs[..., i, j]
.
Args:
matrix
: ATensor
. Must be one of the following types:float64
,float32
,complex64
,complex128
. Shape is[..., M, M]
.rhs
: ATensor
. Must have the same type asmatrix
. Shape is[..., M, K]
.lower
: An optionalbool
. Defaults toTrue
. Boolean indicating whether the innermost matrices inmatrix
are lower or upper triangular.adjoint
: An optionalbool
. Defaults toFalse
. Boolean indicating whether to solve withmatrix
or its (block-wise) adjoint.name
: A name for the operation (optional).
Returns:
A Tensor
. Has the same type as matrix
.
Numpy Compatibility
Equivalent to scipy.linalg.solve_triangular