Moves a tensor to the device memory.
1
to_device(deviceId: int)
Parameter
Type
Description
deviceId
int
Device ID
If the tensor memory fails to be allocated and copied to the device, a runtime exception is thrown.