Qr

public final class Qr

Computes the QR decompositions of one or more matrices.

Computes the QR decomposition of each inner matrix in `tensor` such that `tensor[..., :, :] = q[..., :, :] * r[..., :,:])`

Currently, the gradient for the QR decomposition is well-defined only when the first `P` columns of the inner matrix are linearly independent, where `P` is the minimum of `M` and `N`, the 2 inner-most dimmensions of `tensor`.

# 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)
 

Nested Classes

class Qr.Options Optional attributes for Qr  

Constants

String OP_NAME The name of this op, as known by TensorFlow core engine

Public Methods

static <T extends TType> Qr<T>
create(Scope scope, Operand<T> input, Options... options)
Factory method to create a class wrapping a new Qr operation.
static Qr.Options
fullMatrices(Boolean fullMatrices)
Output<T>
q()
Orthonormal basis for range of `a`.
Output<T>
r()
Triangular factor.

Inherited Methods

Constants

public static final String OP_NAME

The name of this op, as known by TensorFlow core engine

Constant Value: "Qr"

Public Methods

public static Qr<T> create (Scope scope, Operand<T> input, Options... options)

Factory method to create a class wrapping a new Qr operation.

Parameters
scope current scope
input 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`.
options carries optional attributes values
Returns
  • a new instance of Qr

public static Qr.Options fullMatrices (Boolean fullMatrices)

Parameters
fullMatrices If true, compute full-sized `q` and `r`. If false (the default), compute only the leading `P` columns of `q`.

public Output<T> q ()

Orthonormal basis for range of `a`. If `full_matrices` is `False` then shape is `[..., M, P]`; if `full_matrices` is `True` then shape is `[..., M, M]`.

public Output<T> r ()

Triangular factor. If `full_matrices` is `False` then shape is `[..., P, N]`. If `full_matrices` is `True` then shape is `[..., M, N]`.