tf.linalg.qr
Stay organized with collections
Save and categorize content based on your preferences.
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 |
input
|
A Tensor . Must be one of the following types: float64 , float32 , half , complex64 , complex128 .
A tensor of shape [..., M, N] whose inner-most 2 dimensions
form matrices of size [M, N] . Let P be the minimum of M and N .
|
full_matrices
|
An optional bool . Defaults to False .
If true, compute full-sized q and r . If false
(the default), compute only the leading P columns of q .
|
name
|
A name for the operation (optional).
|
Returns |
A tuple of Tensor objects (q, r).
|
q
|
A Tensor . Has the same type as input .
|
r
|
A Tensor . Has the same type as input .
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.linalg.qr\n\n\u003cbr /\u003e\n\n|-------------------------------------------------------|\n| [TensorFlow 2 version](/api_docs/python/tf/linalg/qr) |\n\nComputes the QR decompositions of one or more matrices.\n\n#### View aliases\n\n\n**Main aliases**\n\n\\`tf.qr\\`\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.linalg.qr`](/api_docs/python/tf/linalg/qr), [`tf.compat.v1.qr`](/api_docs/python/tf/linalg/qr), \\`tf.compat.v2.linalg.qr\\`\n\n\u003cbr /\u003e\n\n tf.linalg.qr(\n input, full_matrices=False, name=None\n )\n\nComputes the QR decomposition of each inner matrix in `tensor` such that\n`tensor[..., :, :] = q[..., :, :] * r[..., :,:])` \n\n # a is a tensor.\n # q is a tensor of orthonormal matrices.\n # r is a tensor of upper triangular matrices.\n q, r = qr(a)\n q_full, r_full = qr(a, full_matrices=True)\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `input` | A `Tensor`. Must be one of the following types: `float64`, `float32`, `half`, `complex64`, `complex128`. A tensor of shape `[..., M, N]` whose inner-most 2 dimensions form matrices of size `[M, N]`. Let `P` be the minimum of `M` and `N`. |\n| `full_matrices` | An optional `bool`. Defaults to `False`. If true, compute full-sized `q` and `r`. If false (the default), compute only the leading `P` columns of `q`. |\n| `name` | A name for the operation (optional). |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|-----|-------------------------------------------|\n| A tuple of `Tensor` objects (q, r). ||\n| `q` | A `Tensor`. Has the same type as `input`. |\n| `r` | A `Tensor`. Has the same type as `input`. |\n\n\u003cbr /\u003e"]]