chainer.get_device¶
-
chainer.
get_device
(device_spec)[source]¶ Returns a device object.
- Parameters
device_spec (object) –
Device specifier. If a
chainer.backend.Device
instance is given, it is returned intact. Otherwise the following values are supported:ChainerX devices
A string representing a device. (ex.
'native:0'
,'native'
)A
chainerx.Device
object.
CuPy
A string starts with
'@cupy:'
. (ex.'@cupy:0'
)A
cupy.cuda.Device
object.
NumPy
The string
'@numpy'
.
NumPy with Intel Architecture
The string
'@intel64'
.