移动Tensor到Device内存中。
1
to_device(deviceId: int)
参数名
类型
说明
deviceId
int
Device设备的ID号。
分配Tensor内存失败及拷贝到Device侧失败,抛出runtime异常。