Interpreter.Options

公共静态类 Interpreter.Options

用于控制运行时解释器行为的选项类。

公共构造函数

公共方法

Interpreter.Options
addDelegate委托委托)
添加了要在创建解释器期间应用的 Delegate
Interpreter.Options
addDelegateFactory(DelegateFactory delegateFactory)
添加了一个 DelegateFactory,系统将调用它,以便在解释器创建期间应用其创建的 Delegate
Interpreter.Options
setAllowBufferHandleOutput(布尔值允许)
高级:设置是否允许输出缓冲区句柄。
Interpreter.Options
setAllowFp16PrecisionForFp32(布尔值允许)
此方法已废弃。最好使用 NnApiDelegate.Options#setAllowFp16(boolean enable)
Interpreter.Options
setCancellable(布尔值允许)
高级:设置是否可以取消翻译员。
Interpreter.Options
setNumThreads(int numThreads)
设置要用于支持多线程的操作的线程数。
Interpreter.Options
setRuntimeInterpreterApi.Options.TfLiteRuntime 运行时)
指定从何处获取 TF Lite 运行时实现。
Interpreter.Options
setUseNNAPI(布尔值 useNNAPI)
设置是否使用 NN API(如果有)进行运算。
Interpreter.Options
setUseXNNPACK(布尔值 useXNNPACK)
启用或停用一组经过优化的 CPU 内核(由 XNNPACK 提供)。

继承的方法