chainer.get_device¶
-
chainer.get_device(device_spec)[source]¶ Returns a device object.
- Parameters
device_spec (object) –
Device specifier. If a
chainer.backend.Deviceinstance 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.Deviceobject.
CuPy
A string starts with
'@cupy:'. (ex.'@cupy:0')A
cupy.cuda.Deviceobject.
NumPy
The string
'@numpy'.
NumPy with Intel Architecture
The string
'@intel64'.