Builder for BaseOptions
.
Builder()
|
abstract BaseOptions |
build()
|
abstract BaseOptions.Builder | |
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.
|
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)
.