InterpreterApi.Options.TfLiteRuntime

public static final 枚举 InterpreterApi.Options.TfLiteRuntime

用于表示从何处获取 TensorFlow Lite 运行时实现的枚举。

此类与 RuntimeFlavor 类之间的区别:此类用于指定要使用的运行时的偏好设置,而 RuntimeFlavor 用于指定要使用的确切运行时。

继承的方法

枚举值

public static final FROM_APPLICATION_ONLY

使用关联到应用的 TF Lite 运行时实现。如果没有关联到应用的合适 TF Lite 运行时实现,则尝试使用此 TfLiteRuntime 设置创建 ExplainerApi 实例将抛出 IllegalStateException 异常(即使操作系统或系统服务可以提供 TF Lite 运行时实现也是如此)。

此选项为默认设置,此设置也适用于必须在不提供 TF Lite 运行时实现的系统上运行的应用。