A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.pytorch.org/docs/stable/generated/torch.linalg.svdvals.html below:

torch.linalg.svdvals — PyTorch 2.8 documentation

Computes the singular values of a matrix.

Supports input of float, double, cfloat and cdouble dtypes. Also supports batches of matrices, and if A is a batch of matrices then the output has the same batch dimensions.

The singular values are returned in descending order.

Note

This function is equivalent to NumPy’s linalg.svd(A, compute_uv=False).

Note

When inputs are on a CUDA device, this function synchronizes that device with the CPU.

Parameters

A (Tensor) – tensor of shape (*, m, n) where * is zero or more batch dimensions.

Keyword Arguments
Returns

A real-valued tensor, even when A is complex.

Examples:

>>> A = torch.randn(5, 3)
>>> S = torch.linalg.svdvals(A)
>>> S
tensor([2.5139, 2.1087, 1.1066])

>>> torch.dist(S, torch.linalg.svd(A, full_matrices=False).S)
tensor(2.4576e-07)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4