spdl.io.to_torch¶
- to_torch(buffer: ArrayInterface | CUDABuffer)[source]¶
Convert to PyTorch Tensor.
- Parameters:
buffer – Object that implements the array interface protocol
:param (has
__array_interface__
) orCUDABuffer
object.:- Returns:
A PyTorch Tensor.
- Return type: