to_device

Function Usage

Moves a tensor to the device memory.

Prototype

1
to_device(deviceId: int)

Input Parameters

Parameter

Type

Description

deviceId

int

Device ID

Exception Throwing Interface

If the tensor memory fails to be allocated and copied to the device, a runtime exception is thrown.