numpy_to_torch#
- muse.utils.numpy_to_torch(numpy_array, cuda_device=None)#
Convert a
numpy.ndarrayto atorch.Tensor.Floating-point precision is capped at float32:
float64input is downcast tofloat32, while narrower dtypes (float16, integers) are left as-is.- Parameters:
- Returns:
The converted Torch tensor.
- Return type: