to_device(deviceId)
Function Usage
Moves a tensor to the device memory.
Input Parameter Description
Parameter |
Type |
Description |
|---|---|---|
deviceId |
int |
Device ID |
Exception Throwing Interface
If the tensor memory fails to be allocated and copied to the device, the runtime exception is thrown.
Parent topic: Tensor