Skip to main content

Module tensor

Module tensor 

Source
Expand description

Validated tensor workflows built from native LibTorch operations.

Helpers allocate outputs and preserve native automatic differentiation; none mutate an input. flatten_features is the explicit exception to independent storage: its copy argument selects a view or an independent allocation. COO coordinate construction and quantization are boundaries without gradients. For individual operations, use the existing Tensor f_* methods directly. See the complete recipes for linear algebra, broadcasting, complex FFTs, special functions and CSR.

Structs§

LeastSquares
Fit diagnostics from least_squares, matching the native gelsd outputs.

Functions§

flatten_features
Flatten [batch, ...features] into [batch, features] with explicit storage.
gather_rows
Select one class score per row of a [batch, classes] tensor.
least_squares
Fit a possibly rank-deficient CPU system using the SVD-based gelsd driver.
quantize_per_tensor
Quantize finite CPU float32 data with explicit per-tensor affine parameters.
replace_masked
Replace masked values without changing the original tensor.
scatter_add_rows
Sum [items, ...] contributions into rows output groups.
select_rows
Select samples from [samples, ...] in the order of a one-dimensional ID tensor.
sparse_coo_matrix
Construct a coalesced sparse COO matrix from checked row/column coordinates.
sparse_matmul
Multiply a two-dimensional sparse COO/CSR matrix by dense feature columns.
spectral_filter
Filter real signals along their last axis with real frequency-bin gains.
standardize
Standardize float32/float64 values along one axis using population variance.