计算一个或多个矩阵的 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。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。
