計算一個或多個矩陣的 QR 分解。
用法
tf.raw_ops.Qr(
input, full_matrices=False, name=None
)參數
-
input一個Tensor。必須是以下類型之一:float64,float32,half,complex64,complex128。形狀為[..., M, N]的張量,其 inner-most 2 維形成大小為[M, N]的矩陣。令P為M和N的最小值。 -
full_matrices可選的bool。默認為False。如果為真,則計算全尺寸q和r。如果為 false(默認值),則僅計算q的前導P列。 -
name操作的名稱(可選)。
返回
-
Tensor對象 (q, r) 的元組。 -
q一個Tensor。具有與input相同的類型。 -
r一個Tensor。具有與input相同的類型。
計算 tensor 中每個內部矩陣的 QR 分解,使得 tensor[...,:,:] = q[...,:,:] * r[...,:,:])
目前,僅當內部矩陣的前 P 列線性無關時,QR 分解的梯度才明確定義,其中 P 是 M 和 N 的最小值,即 2 個 inner-most 維度tensor 的。
# a is a tensor.
# q is a tensor of orthonormal matrices.
# r is a tensor of upper triangular matrices.
q, r = qr(a)
q_full, r_full = qr(a, full_matrices=True)
相關用法
- Python tf.raw_ops.QuantizeV2用法及代碼示例
- Python tf.raw_ops.QuantizedMatMulWithBiasAndReluAndRequantize用法及代碼示例
- Python tf.raw_ops.QuantizedReshape用法及代碼示例
- Python tf.raw_ops.QuantizedMatMulWithBias用法及代碼示例
- Python tf.raw_ops.QuantizedMatMulWithBiasAndRelu用法及代碼示例
- Python tf.raw_ops.TPUReplicatedInput用法及代碼示例
- Python tf.raw_ops.Bitcast用法及代碼示例
- Python tf.raw_ops.SelfAdjointEigV2用法及代碼示例
- Python tf.raw_ops.BatchMatMul用法及代碼示例
- Python tf.raw_ops.OneHot用法及代碼示例
- Python tf.raw_ops.ResourceScatterNdSub用法及代碼示例
- Python tf.raw_ops.ReadVariableXlaSplitND用法及代碼示例
- Python tf.raw_ops.GatherV2用法及代碼示例
- Python tf.raw_ops.Expm1用法及代碼示例
- Python tf.raw_ops.BitwiseAnd用法及代碼示例
- Python tf.raw_ops.UniqueWithCounts用法及代碼示例
- Python tf.raw_ops.DecodeGif用法及代碼示例
- Python tf.raw_ops.Size用法及代碼示例
- Python tf.raw_ops.ScatterUpdate用法及代碼示例
- Python tf.raw_ops.ParallelConcat用法及代碼示例
注:本文由純淨天空篩選整理自tensorflow.org大神的英文原創作品 tf.raw_ops.Qr。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。
