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