singularValueDecomposition

fun singularValueDecomposition(source: Tensor, wResult: Tensor?, uResult: Tensor?, vtResult: Tensor?)

Perform singular value decomposition of a matrix.

Parameters

source

the matrix to be decomposed. It must be a multi-dimensional tensor of 1 channel, 2 dimensions: DxD. The data type must be 32-/64-bit float.

wResult

an optional result for the W part of the SVD. It must be a multi-dimensional tensor of 1 channel, 2 dimensions. The data type must be 32-/64-bit float.

uResult

an optional result for the U part of the SVD. It must be a multi-dimensional tensor of 1 channel, 2 dimensions. The data type must be 32-/64-bit float.

vtResult

an optional result for the VT part of the SVD. It must be a multi-dimensional tensor of 1 channel, 2 dimensions. The data type must be 32-/64-bit float.

Throws

If the usage is not allowed by the SpatialML run-time Framework, or if the framework encounter internal error and cannot perform the requested behavior.