Closed kobenaxie closed 9 months ago
We don't support tensor.to(0)
.
You can use
tensor.to('cpu')
or
tensor.to('cuda:0')
or
device = torch.device('cpu')
tensor.to(device)
or
device = torch.device('cuda', 0)
tensor.to(device)
Please only use the above methods and never try tensor.to(0)
, which I have never seen before.
I try to copy a
RaggedTensor
from CPU to GPU bytensor.to(0)
, but failed with errorRuntimeError: Invalid device string: '0'
, whiletorch.Tensor
succeeded.