Add reference pdf to qr backward and add assumptions to docs

This commit is contained in:
Denisa Roberts 2020-09-26 13:47:02 -04:00
parent b0ccb433d9
commit 5a463d1ced
2 changed files with 5 additions and 0 deletions

View File

@ -34,6 +34,10 @@ END
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`.
```python
# a is a tensor.
# q is a tensor of orthonormal matrices.

View File

@ -524,6 +524,7 @@ def _QrGrad(op, dq, dr):
return _QrGradSquareAndDeepMatrices(q, r, dq, dr)
# Partition a = [x, y], r = [u, v] and reduce to the square case
# The methodology is explained in detail in https://arxiv.org/abs/2009.10071
a = op.inputs[0]
y = a[..., :, num_rows:]
u = r[..., :, :num_rows]