Expand description
Linear algebra operations for Burn tensors.
No execution backend is enabled by default. Select flex, wgpu, or another
backend feature on this crate. When configuring through burn, enable both
linalg and the backend feature, for example features = ["linalg", "flex"].
Enabling only burn/flex does not enable this crate’s backend implementations.
§Migration
Linear algebra previously lived at burn_tensor::linalg (and therefore
burn_core::tensor::linalg). Those direct-crate paths are intentionally
removed. Use this crate directly, or burn::linalg from the umbrella crate.
Enums§
- Norm
- Specifies the type of norm to compute.
Traits§
- Linalg
Ops - Linear algebra operations supplied by a backend extension.
Functions§
- cosine_
similarity - Computes the cosine similarity between two tensors along a specified dimension.
- det
- Computes the determinant on the last two dimensions of the input tensor.
- diag
- Returns the diag of a matrix.
- l0_norm
- Computes the L0 norm of a tensor along a specified dimension.
- l0_
norm_ dims - Computes the L0 norm of a tensor along specified dimensions.
- l1_norm
- Computes the L1 norm of a tensor along a specified dimension.
- l1_
norm_ dims - Computes the L1 norm of a tensor along specified dimensions.
- l2_norm
- Computes the L2 norm of a tensor along a specified dimension.
- l2_
norm_ dims - Computes the L2 norm of a tensor along specified dimensions.
- lp_norm
- Computes the general
L(p)norm of a tensor along a specified dimension. - lp_
norm_ dims - Computes the general
L(p)norm of a tensor along specified dimensions. - lu
- Computes the LU decomposition of a square or rectangular matrix with partial pivoting.
- matvec
- Performs matrix-vector multiplication with optional batch dimensions.
- max_
abs_ norm - Computes the L:INFINITY norm of a tensor along a specified dimension.
- max_
abs_ norm_ dims - Computes the L:INFINITY norm of a tensor along specified dimensions.
- min_
abs_ norm - Computes the L:NEG_INFINITY norm of a tensor along a specified dimension.
- min_
abs_ norm_ dims - Computes the L:NEG_INFINITY norm of a tensor along specified dimensions.
- outer
- Computes the outer product for the last columns of 2 tensors.
- outer_
dim - Computes the outer product along a specific dimension, broadcasting over others.
- qr
- Computes the QR decomposition of a square or rectangular matrix using Householder reflections.
- svd
- Computes the singular value decomposition of a square or rectangular matrix.
- trace
- Computes the trace of a matrix.
- vector_
norm - Computes the vector norm of a tensor along a specified dimension.
- vector_
norm_ dims - Computes the vector norm of a tensor along specified dimensions.
- vector_
normalize - Normalize a tensor versus its
vector_norm.