|
4295 | 4295 | `U, S, V = torch.svd(A)` returns the singular value decomposition of a |
4296 | 4296 | real matrix `A` of size `(n x m)` such that :math:`A = USV^T`. |
4297 | 4297 |
|
4298 | | -`U` is of shape :math:`(n \times \min(n, m))`. |
| 4298 | +`U` is of shape :math:`(n \times n)`. |
4299 | 4299 |
|
4300 | | -`S` is a diagonal matrix of shape :math:`(\min(n, m) \times \min(n, m))`, |
4301 | | -represented as a vector of size :math:`\min(n, m)` containing the diagonal |
4302 | | -entries. |
| 4300 | +`S` is a diagonal matrix of shape :math:`(n \times m)`, represented as a vector |
| 4301 | +of size :math:`\min(n, m)` containing the diagonal entries. |
4303 | 4302 |
|
4304 | | -`V` is of shape :math:`(m \times \min(n, m))`. |
| 4303 | +`V` is of shape :math:`(m \times m)`. |
4305 | 4304 |
|
4306 | | -:attr:`some` represents the number of singular values to be computed. |
4307 | | -If `some=True`, it computes some and `some=False` computes all. |
| 4305 | +If :attr:`some` is ``True`` (default), the returned `U` and `V` matrices will |
| 4306 | +contain only :math:`min(n, m)` orthonormal columns. |
4308 | 4307 |
|
4309 | 4308 | .. note:: Irrespective of the original strides, the returned matrix `U` |
4310 | 4309 | will be transposed, i.e. with strides `(1, n)` instead of `(n, 1)`. |
|
4321 | 4320 |
|
4322 | 4321 | Args: |
4323 | 4322 | input (Tensor): the input 2-D tensor |
4324 | | - some (bool, optional): controls the number of singular values to be computed |
| 4323 | + some (bool, optional): controls the shape of returned `U` and `V` |
4325 | 4324 | out (tuple, optional): the output tuple of tensors |
4326 | 4325 |
|
4327 | 4326 | Example:: |
|
0 commit comments