计算一个或多个矩阵的奇异值分解。
用法
tf.raw_ops.Svd(
input, compute_uv=True, full_matrices=False, name=None
)参数
-
input一个Tensor。必须是以下类型之一:float64,float32,half,complex64,complex128。形状为[..., M, N]的张量,其 inner-most 2 维形成大小为[M, N]的矩阵。令P为M和N的最小值。 -
compute_uv可选的bool。默认为True。如果为真,将分别计算并返回u和v中的左右奇异向量。如果为 false,则u和v未设置且永远不应引用。 -
full_matrices可选的bool。默认为False。如果为真,则计算全尺寸u和v。如果为 false(默认值),则仅计算前导P奇异向量。如果compute_uv是False则忽略。 -
name操作的名称(可选)。
返回
-
Tensor对象(s、u、v)的元组。 -
s一个Tensor。具有与input相同的类型。 -
u一个Tensor。具有与input相同的类型。 -
v一个Tensor。具有与input相同的类型。
计算 input 中每个内部矩阵的 SVD,使得 input[...,:,:] = u[...,:,:] * diag(s[...,:,:]) * transpose(v[...,:,:])
# a is a tensor containing a batch of matrices.
# s is a tensor of singular values for each matrix.
# u is the tensor containing the left singular vectors for each matrix.
# v is the tensor containing the right singular vectors for each matrix.
s, u, v = svd(a)
s, _, _ = svd(a, compute_uv=False)
相关用法
- Python tf.raw_ops.SelfAdjointEigV2用法及代码示例
- Python tf.raw_ops.Size用法及代码示例
- Python tf.raw_ops.ScatterUpdate用法及代码示例
- Python tf.raw_ops.ScatterNdUpdate用法及代码示例
- Python tf.raw_ops.SparseCrossV2用法及代码示例
- Python tf.raw_ops.ScatterAdd用法及代码示例
- Python tf.raw_ops.Sub用法及代码示例
- Python tf.raw_ops.SparseCross用法及代码示例
- Python tf.raw_ops.SegmentMean用法及代码示例
- Python tf.raw_ops.ScatterSub用法及代码示例
- Python tf.raw_ops.StringStrip用法及代码示例
- Python tf.raw_ops.SparseConcat用法及代码示例
- Python tf.raw_ops.SparseSegmentSumWithNumSegments用法及代码示例
- Python tf.raw_ops.SparseMatrixSparseMatMul用法及代码示例
- Python tf.raw_ops.SparseMatrixOrderingAMD用法及代码示例
- Python tf.raw_ops.Shape用法及代码示例
- Python tf.raw_ops.ScatterDiv用法及代码示例
- Python tf.raw_ops.SparseFillEmptyRows用法及代码示例
- Python tf.raw_ops.ScatterNdSub用法及代码示例
- Python tf.raw_ops.Sign用法及代码示例
注:本文由纯净天空筛选整理自tensorflow.org大神的英文原创作品 tf.raw_ops.Svd。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。
