Class MxDeviceType

java.lang.Object
ai.djl.mxnet.engine.MxDeviceType

public final class MxDeviceType extends Object
DeviceType is the MXNet equivalent of the types in Device.
  • Method Details

    • toDeviceType

      public static int toDeviceType(ai.djl.Device device)
      Converts a Device to the corresponding MXNet device number.
      Parameters:
      device - the java Device
      Returns:
      the MXNet device number
    • fromDeviceType

      public static String fromDeviceType(int deviceType)
      Converts from an MXNet device number to Device.
      Parameters:
      deviceType - the MXNet device number
      Returns:
      the corresponding Device