mindspore.ops.Orgqr

class mindspore.ops.Orgqr[source]

Calculates the explicit representation of the orthogonal matrix \(Q\) returned by mindspore.ops.Geqrf.

Warning

This is an experimental API that is subject to change or deletion.

Refer to mindspore.ops.orgqr() for more details.

Inputs:
  • x (Tensor) - Tensor of shape \((*, M, N)\), indicating 2D or 3D matrices, with float32, float64, complex64 and complex128 data type.

  • tau (Tensor) - Indicates the reflecting coefficient in Householder transformation, it has shape \((*, K)\), where K is less than or equal to N, and it has the same type as x.

Outputs:

Tensor, has the same shape and data type as x.

Supported Platforms:

Ascend GPU CPU

Examples

>>> import mindspore
>>> import numpy as np
>>> from mindspore import Tensor, ops
>>> x = Tensor(np.array([[-114.6, 10.9, 1.1], [-0.304, 38.07, 69.38], [-0.45, -0.17, 62.]]), mindspore.float32)
>>> tau = Tensor(np.array([1.55, 1.94, 0.0]), mindspore.float32)
>>> net = ops.Orgqr()
>>> y = net(x, tau)
>>> print(y)
[[-0.54999995 -0.2128925   0.8137956 ]
 [ 0.47119996 -0.8752807   0.08240613]
 [ 0.69749993  0.42560163  0.57772595]]