計算一個或多個矩陣的奇異值分解。
用法
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。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。
