mindspore.ops.ormqr

mindspore.ops.ormqr(input, tau, other, left=True, transpose=False)[source]

Calculates the product of a matrix other and a matrix Q (represented by Householder vectors input and Householder reflection coefficients tau).

If left is True, computes Q * other , otherwise, compute other * Q.

Parameters
  • input (Tensor) – The input tensor, shape \((*, mn, k)\), when left is True, mn equals to m, otherwise, mn equals to n.

  • tau (Tensor) – The input tensor, shape \((*, min(mn, k))\) .

  • other (Tensor) – The input tensor, shape \((*, m, n)\) .

  • left (bool, optional) – The order of computation. Default True .

  • transpose (bool, optional) – Whether the matrix Q is conjugate transposed or not. Default False .

Returns

Tensor

Supported Platforms:

GPU

Examples

>>> import mindspore
>>> input = mindspore.tensor(([[-114.6, 10.9, 1.1], [-0.304, 38.07, 69.38], [-0.45, -0.17, 62]]),
...                             mindspore.float32)
>>> tau = mindspore.tensor(([1.55, 1.94, 3.0]), mindspore.float32)
>>> other = mindspore.tensor(([[-114.6, 10.9, 1.1],
...                            [-0.304, 38.07, 69.38],
...                            [-0.45, -0.17, 62]]), mindspore.float32)
>>> output = mindspore.ops.ormqr(input, tau, other)
>>> print(output)
[[  63.82713   -13.823125 -116.28614 ]
 [ -53.659264  -28.157839  -70.42702 ]
 [ -79.54292    24.00183   -41.34253 ]]