Class MLCDeviceType


  • public final class MLCDeviceType
    extends java.lang.Object
    [@enum] MLCDeviceType A device type for execution of a neural network.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ANE
      The Apple Neural Engine device.
      static int Any
      The any device type.
      static int Count
      holds the number of MLCDeviceType
      static int CPU
      The CPU device
      static int GPU
      The GPU device.
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • Any

        public static final int Any
        The any device type. When selected, the framework will automatically use the appropriate devices to achieve the best performance.
        See Also:
        Constant Field Values
      • ANE

        public static final int ANE
        The Apple Neural Engine device. When selected, the framework will use the Neural Engine to execute all layers that can be executed on it. Layers that cannot be executed on the ANE will run on the CPU or GPU. The Neural Engine device must be explicitly selected. MLDeviceTypeAny will not select the Neural Engine device. In addition, this device can be used with inference graphs only. This device cannot be used with a training graph or an inference graph that shares layers with a training graph. API-Since: 15.0
        See Also:
        Constant Field Values