tensorflow/lite/g3doc/api_docs/java/org/tensorflow/lite/task/core/BaseOptions.Builder.html
public static abstract class BaseOptions.Builder
Builder for BaseOptions.
| | Builder() |
| abstract BaseOptions | build() | | abstract BaseOptions.Builder | setComputeSettings(ComputeSettings computeSettings) Sets the advanced accelerator options.
| | abstract BaseOptions.Builder | setNumThreads(int numThreads) Sets the number of threads to be used for TFLite ops that support multi-threading when running inference with CPU.
| | BaseOptions.Builder | useGpu() Uses GPU for inference.
| | BaseOptions.Builder | useNnapi() Uses NNAPI for inference.
|
From class java.lang.Object
| boolean | equals(Object arg0) | | final Class<?> | getClass() | | int | hashCode() | | final void | notify() | | final void | notifyAll() | | String | toString() | | final void | wait(long arg0, int arg1) | | final void | wait(long arg0) | | final void | wait() |
Sets the advanced accelerator options.
Note: this method will override those highlevel API to choose an delegate, such as useGpu() and useNnapi().
| computeSettings | |
Sets the number of threads to be used for TFLite ops that support multi-threading when running inference with CPU. Defaults to -1.
numThreads should be greater than 0 or equal to -1. Setting numThreads to -1 has the effect to let TFLite runtime set the value.
| numThreads | |
Uses GPU for inference. The advanced GPU configuration settings will be set to default values.
Note: this method will override the settings from setComputeSettings(ComputeSettings).
To manipulate the advanced GPU configuration settings, use setComputeSettings(ComputeSettings).
Uses NNAPI for inference. The advanced NNAPI configuration settings will be set to default values.
Note: this method will override the settings from setComputeSettings(ComputeSettings).
To manipulate the advanced NNAPI configuration settings, use setComputeSettings(ComputeSettings).