1

我看到有一些方法可以在 TensorFlow 中进行Cholesky 分解和使用 QR 方法求解线性系统,但是,我找不到在 TensorFlow 中实现 QR 分解的方法。

如何在 TensorFlow 中执行 QR 分解?

4

1 回答 1

1

似乎 QR 分解现在在 tensorflow master 中;它是上周添加的。

tf.qr(input, full_matrices=None, name=None)

计算一个或多个矩阵的 QR 分解。

计算每个内部矩阵的 QR 分解,tensor使得 tensor[..., :, :] = q[..., :, :] * r[..., :,:])

# 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)
于 2016-11-30T22:07:40.993 回答