Get Started
Advanced Materials
API Reference
Notes
Misc
DiagMatrix.
cpu
Moves the matrix to CPU. If the matrix is already on CPU, the original matrix will be returned.
The matrix on CPU
DiagMatrix
Examples
>>> val = torch.ones(2) >>> D = dglsp.diag(val) >>> D.cpu() DiagMatrix(values=tensor([1., 1.]), shape=(2, 2))