spdl.io.to_torch

to_torch(buffer: CPUBuffer | CUDABuffer)[source]

Convert to PyTorch Tensor.

Parameters:

buffer – Object implements the (CUDA) array interface protocol.

Returns:

A PyTorch Tensor.

Return type:

(torch.Tensor)