jax.lax.linalg.svd#
- jax.lax.linalg.svd(x: ArrayLike, *, full_matrices: bool = True, compute_uv: Literal[True], subset_by_index: tuple[int, int] | None = None, algorithm: SvdAlgorithm | None = None) tuple[Array, Array, Array] [source]#
- jax.lax.linalg.svd(x: ArrayLike, *, full_matrices: bool = True, compute_uv: Literal[False], subset_by_index: tuple[int, int] | None = None, algorithm: SvdAlgorithm | None = None) Array
- jax.lax.linalg.svd(x: ArrayLike, *, full_matrices: bool = True, compute_uv: bool = True, subset_by_index: tuple[int, int] | None = None, algorithm: SvdAlgorithm | None = None) Array | tuple[Array, Array, Array]
Singular value decomposition.
Computes the singular value decomposition of an input matrix.
- Parameters:
x – A batch of matrices with shape
[..., m, n]
.full_matrices – Determines if full or reduced matrices are returned.
compute_uv – If
True
, returns the left singular vectors, the singular values and the adjoint of the right singular vectors. Otherwise, only the singular values are returned.subset_by_index – If
None
, the entire matrix is returned. Otherwise, returns the singular values and vectors for the given range of indices.algorithm – The SVD algorithm to use. Must be
None
or a value fromSvdAlgorithm
.
- Returns:
The singular values if
compute_uv
isFalse
, otherwise returns a triple containing the left singular vectors, the singular values, and the adjoint of the right singular vectors.