torch.linalg.svd_lowrank
function svd_lowrank<S extends Shape, D extends DType, Dev extends DeviceType>(A: Tensor<S, D, Dev>, options?: SvdLowrankOptions): {
U: Tensor<DynamicShape, D, Dev>;
S: Tensor<DynamicShape, D, Dev>;
V: Tensor<DynamicShape, D, Dev>;
}function svd_lowrank<S extends Shape, D extends DType, Dev extends DeviceType>(A: Tensor<S, D, Dev>, q: number, niter: number, M: Tensor<Shape, D, Dev>, options?: SvdLowrankOptions): {
U: Tensor<DynamicShape, D, Dev>;
S: Tensor<DynamicShape, D, Dev>;
V: Tensor<DynamicShape, D, Dev>;
}Computes a low-rank SVD approximation using randomized algorithms. This is faster than full SVD for very large matrices when only a few singular values are needed.
Parameters
ATensor<S, D, Dev>- Input matrix (..., m, n)
optionsSvdLowrankOptionsoptional
Returns
{ U: Tensor<DynamicShape, D, Dev>; S: Tensor<DynamicShape, D, Dev>; V: Tensor<DynamicShape, D, Dev>; }– Object with U, S, V tensors for the low-rank approximation