tf.linalg.qr

Computes the QR decompositions of one or more matrices.

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

Computes the QR decomposition of each inner matrix in tensor such that 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)

Args:

Returns:

A tuple of Tensor objects (q, r).