device

class dragon.vm.torch.device(
  type='cpu',
  index=0
)[source]

Represent the device spec.

__init__

device.__init__(
  type='cpu',
  index=0
)[source]

Create a device.

Parameters:
  • type (str, optional, default='cpu') – The device type.
  • index (int, optional, default=0) – The device index.