从 LU 分解重构一个或多个矩阵。
用法
tf.linalg.lu_reconstruct(
lower_upper, perm, validate_args=False, name=None
)
参数
-
lower_upper
lu
由tf.linalg.lu
返回,即如果matmul(P, matmul(L, U)) = X
则lower_upper = L + U - eye
。 -
perm
p
由tf.linag.lu
返回,即如果matmul(P, matmul(L, U)) = X
则perm = argmax(P)
。 -
validate_args
Pythonbool
指示是否应检查参数的正确性。默认值:False
(即不验证参数)。 -
name
Pythonstr
赋予此对象管理的操作的名称。默认值:None
(即'lu_reconstruct')。
返回
-
x
tf.linalg.lu
的原始输入,即x
如lu_reconstruct(*tf.linalg.lu(x))
。
例子
import numpy as np
import tensorflow as tf
import tensorflow_probability as tfp
x = [[[3., 4], [1, 2]],
[[7., 8], [3, 4]]]
x_reconstructed = tf.linalg.lu_reconstruct(*tf.linalg.lu(x))
tf.assert_near(x, x_reconstructed)
# ==> True
相关用法
- Python tf.linalg.lu_matrix_inverse用法及代码示例
- Python tf.linalg.lu_solve用法及代码示例
- Python tf.linalg.logdet用法及代码示例
- Python tf.linalg.LinearOperatorFullMatrix.matvec用法及代码示例
- Python tf.linalg.LinearOperatorToeplitz.solve用法及代码示例
- Python tf.linalg.LinearOperatorIdentity.solvevec用法及代码示例
- Python tf.linalg.LinearOperatorPermutation.solve用法及代码示例
- Python tf.linalg.band_part用法及代码示例
- Python tf.linalg.LinearOperatorKronecker.diag_part用法及代码示例
- Python tf.linalg.LinearOperatorToeplitz.matvec用法及代码示例
- Python tf.linalg.LinearOperatorBlockLowerTriangular.solvevec用法及代码示例
- Python tf.linalg.LinearOperatorLowerTriangular.matvec用法及代码示例
- Python tf.linalg.LinearOperatorCirculant2D.solve用法及代码示例
- Python tf.linalg.LinearOperatorCirculant3D.diag_part用法及代码示例
- Python tf.linalg.LinearOperatorToeplitz.solvevec用法及代码示例
- Python tf.linalg.LinearOperatorCirculant2D.assert_non_singular用法及代码示例
- Python tf.linalg.LinearOperatorPermutation.diag_part用法及代码示例
- Python tf.linalg.LinearOperatorToeplitz用法及代码示例
- Python tf.linalg.LinearOperatorCirculant2D.matvec用法及代码示例
- Python tf.linalg.LinearOperatorTridiag.solvevec用法及代码示例
注:本文由纯净天空筛选整理自tensorflow.org大神的英文原创作品 tf.linalg.lu_reconstruct。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。