tensorflow/lite/g3doc/api_docs/java/org/tensorflow/lite/task/processor/SearcherOptions.Builder.html
public static abstract class SearcherOptions.Builder
Builder for SearcherOptions.
| | Builder() |
| abstract SearcherOptions | build() | | abstract SearcherOptions.Builder | setIndexFile(File indexFile) Sets the index file to search into.
| | abstract SearcherOptions.Builder | setL2Normalize(boolean l2Normalize) Sets whether to normalize the embedding feature vector with L2 norm.
| | abstract SearcherOptions.Builder | setMaxResults(int maxResults) Sets the maximum number of nearest neighbor results to return.
| | abstract SearcherOptions.Builder | setQuantize(boolean quantize) Sets whether the embedding should be quantized to bytes via scalar quantization.
|
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 index file to search into.
Required if the model does not come with an index file inside. Otherwise, it can be ignore by setting to null.
| indexFile | |
Sets whether to normalize the embedding feature vector with L2 norm. Defaults to false.
Use this option only if the model does not already contain a native L2_NORMALIZATION TFLite Op. In most cases, this is already the case and L2 norm is thus achieved through TFLite inference.
| l2Normalize | |
Sets the maximum number of nearest neighbor results to return. Defaults to 5
| maxResults | |
Sets whether the embedding should be quantized to bytes via scalar quantization. Defaults to false.
Embeddings are implicitly assumed to be unit-norm and therefore any dimension is guaranteed to have a value in [-1.0, 1.0]. Use the l2_normalize option if this is not the case.
| quantize | |