|
1469 | 1469 | r""" |
1470 | 1470 | geqrf(input, out=None) -> (Tensor, Tensor) |
1471 | 1471 |
|
1472 | | -This is a low-level function for calling LAPACK directly. |
| 1472 | +This is a low-level function for calling LAPACK directly. |
1473 | 1473 |
|
1474 | 1474 | You'll generally want to use :func:`torch.qr` instead. |
1475 | 1475 |
|
1476 | | -Computes a QR decomposition of :attr:`input`, but without constructing `Q` and `R` as explicit separate matrices. |
| 1476 | +Computes a QR decomposition of :attr:`input`, but without constructing `Q` and `R` as explicit separate matrices. |
1477 | 1477 |
|
1478 | | -Rather, this directly calls the underlying LAPACK function `?geqrf` which produces a sequence of 'elementary reflectors'. |
| 1478 | +Rather, this directly calls the underlying LAPACK function `?geqrf` which produces a sequence of 'elementary reflectors'. |
1479 | 1479 |
|
1480 | 1480 | See `LAPACK documentation`_ for further details. |
1481 | 1481 |
|
|
1517 | 1517 | gesv(B, A, out=None) -> (Tensor, Tensor) |
1518 | 1518 |
|
1519 | 1519 | `X, LU = torch.gesv(B, A)` returns the solution to the system of linear |
1520 | | -equations represented by :math:`AX = B` |
| 1520 | +equations represented by :math:`AX = B` |
1521 | 1521 |
|
1522 | 1522 | `LU` contains `L` and `U` factors for LU factorization of `A`. |
1523 | 1523 |
|
1524 | 1524 | :attr:`A` has to be a square and non-singular matrix (2D Tensor). |
1525 | 1525 |
|
1526 | | -If `A` is an `m x m` matrix and `B` is `m x k`, |
| 1526 | +If `A` is an `m x m` matrix and `B` is `m x k`, |
1527 | 1527 | the result `LU` is `m x m` and `X` is `m x k` . |
1528 | 1528 |
|
1529 | | -.. note:: Irrespective of the original strides, the returned matrices |
1530 | | - `X` and `LU` will be transposed, i.e. with strides `(1, m)` |
| 1529 | +.. note:: Irrespective of the original strides, the returned matrices |
| 1530 | + `X` and `LU` will be transposed, i.e. with strides `(1, m)` |
1531 | 1531 | instead of `(m, 1)`. |
1532 | 1532 |
|
1533 | 1533 | Args: |
|
3052 | 3052 | """ |
3053 | 3053 | qr(input, out=None) -> (Tensor, Tensor) |
3054 | 3054 |
|
3055 | | -Computes the QR decomposition of a matrix :attr:`input`: returns matrices |
3056 | | -`q` and `r` such that :math:`x = q * r`, with `q` being an orthogonal matrix |
3057 | | -and `r` being an upper triangular matrix. |
| 3055 | +Computes the QR decomposition of a matrix :attr:`input`: returns matrices |
| 3056 | +`q` and `r` such that :math:`x = q * r`, with `q` being an orthogonal matrix |
| 3057 | +and `r` being an upper triangular matrix. |
3058 | 3058 |
|
3059 | 3059 | This returns the thin (reduced) QR factorization. |
3060 | 3060 |
|
3061 | 3061 | .. note:: precision may be lost if the magnitudes of the elements of `input` are large |
3062 | 3062 |
|
3063 | | -.. note:: while it should always give you a valid decomposition, it may not |
3064 | | - give you the same one across platforms - it will depend on your |
| 3063 | +.. note:: while it should always give you a valid decomposition, it may not |
| 3064 | + give you the same one across platforms - it will depend on your |
3065 | 3065 | LAPACK implementation. |
3066 | 3066 |
|
3067 | | -.. note:: Irrespective of the original strides, the returned matrix `q` will be |
| 3067 | +.. note:: Irrespective of the original strides, the returned matrix `q` will be |
3068 | 3068 | transposed, i.e. with strides `(1, m)` instead of `(m, 1)`. |
3069 | 3069 |
|
3070 | 3070 | Args: |
|
3708 | 3708 | """ |
3709 | 3709 | svd(input, some=True, out=None) -> (Tensor, Tensor, Tensor) |
3710 | 3710 |
|
3711 | | -`U, S, V = torch.svd(A)` returns the singular value decomposition of a |
| 3711 | +`U, S, V = torch.svd(A)` returns the singular value decomposition of a |
3712 | 3712 | real matrix `A` of size `(n x m)` such that :math:`A = USV'*`. |
3713 | 3713 |
|
3714 | 3714 | `U` is of shape `n x n` |
|
3717 | 3717 |
|
3718 | 3718 | `V` is of shape `m x m`. |
3719 | 3719 |
|
3720 | | -:attr:`some` represents the number of singular values to be computed. |
| 3720 | +:attr:`some` represents the number of singular values to be computed. |
3721 | 3721 | If `some=True`, it computes some and `some=False` computes all. |
3722 | 3722 |
|
3723 | | -.. note:: Irrespective of the original strides, the returned matrix `U` |
| 3723 | +.. note:: Irrespective of the original strides, the returned matrix `U` |
3724 | 3724 | will be transposed, i.e. with strides `(1, n)` instead of `(n, 1)`. |
3725 | 3725 |
|
3726 | 3726 | Args: |
|
3783 | 3783 | """ |
3784 | 3784 | symeig(input, eigenvectors=False, upper=True, out=None) -> (Tensor, Tensor) |
3785 | 3785 |
|
3786 | | -`e, V = torch.symeig(input)` returns eigenvalues and eigenvectors |
| 3786 | +`e, V = torch.symeig(input)` returns eigenvalues and eigenvectors |
3787 | 3787 | of a symmetric real matrix :attr:`input`. |
3788 | 3788 |
|
3789 | 3789 | `input` and `V` are `m x m` matrices and `e` is a `m` dimensional vector. |
3790 | 3790 |
|
3791 | | -This function calculates all eigenvalues (and vectors) of `input` |
| 3791 | +This function calculates all eigenvalues (and vectors) of `input` |
3792 | 3792 | such that `input = V diag(e) V'` |
3793 | 3793 |
|
3794 | | -The boolean argument :attr:`eigenvectors` defines computation of |
| 3794 | +The boolean argument :attr:`eigenvectors` defines computation of |
3795 | 3795 | eigenvectors or eigenvalues only. |
3796 | 3796 |
|
3797 | | -If it is `False`, only eigenvalues are computed. If it is `True`, |
| 3797 | +If it is `False`, only eigenvalues are computed. If it is `True`, |
3798 | 3798 | both eigenvalues and eigenvectors are computed. |
3799 | 3799 |
|
3800 | | -Since the input matrix `input` is supposed to be symmetric, |
3801 | | -only the upper triangular portion is used by default. |
| 3800 | +Since the input matrix `input` is supposed to be symmetric, |
| 3801 | +only the upper triangular portion is used by default. |
3802 | 3802 |
|
3803 | 3803 | If :attr:`upper` is `False`, then lower triangular portion is used. |
3804 | 3804 |
|
3805 | | -Note: Irrespective of the original strides, the returned matrix `V` will |
| 3805 | +Note: Irrespective of the original strides, the returned matrix `V` will |
3806 | 3806 | be transposed, i.e. with strides `(1, m)` instead of `(m, 1)`. |
3807 | 3807 |
|
3808 | 3808 | Args: |
|
0 commit comments