tf.linalg.qr
Вычисляет QR-разложение одной или нескольких матриц.
tf.linalg.qr(
input, full_matrices=False, name=None
)
Вычисляет 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)
| Аргументы | |
|---|---|
input | A Tensor. Должен быть одного из следующих типов: 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 | Необязательный bool. По умолчанию False. Если true, вычислите полноразмерное q и r. Если false (по умолчанию), вычислите только ведущие P столбцы q. |
name | Имя операции (необязательно). |
| Возвращаемые значения | |
|---|---|
Кортеж объектов Tensor (q, r). | |
q | A Tensor. Имеет тот же тип, что и input. |
r | A Tensor. Имеет тот же тип, что и input. |
© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/linalg/qr