@Namespace(value="tflite::impl") @NoOffset @Properties(inherit=tensorflowlite.class) public class InterpreterBuilder extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
InterpreterBuilder(FlatBufferModel model,
OpResolver op_resolver) |
InterpreterBuilder(FlatBufferModel model,
OpResolver op_resolver,
InterpreterOptions options_experimental)
For this constructor, the ErrorReporter will be extracted from the
FlatBufferModel.
|
InterpreterBuilder(Pointer p)
Pointer cast constructor.
|
InterpreterBuilder(Pointer model,
OpResolver op_resolver) |
InterpreterBuilder(Pointer model,
OpResolver op_resolver,
ErrorReporter error_reporter,
InterpreterOptions options_experimental,
Allocation allocation)
Builds an interpreter given only the raw flatbuffer Model object (instead
of a FlatBufferModel).
|
Modifier and Type | Method and Description |
---|---|
void |
AddDelegate(TfLiteDelegate delegate)
Any delegates added with AddDelegate will be applied to the Interpreter
generated by operator(), in the order that they were added.
|
void |
AddDelegate(TfLiteOpaqueDelegateStruct opaque_delegate) |
int |
apply(Interpreter interpreter)
Builds an interpreter and stores it in
*interpreter . |
int |
apply(Interpreter interpreter,
int num_threads)
Same as above, but also sets the number of CPU threads to use
(overriding any previous call to SetNumThreads).
|
int |
SetNumThreads(int num_threads)
Sets the number of CPU threads to use for the interpreter.
|
void |
SetTelemetryProfiler(TelemetryProfiler profiler) |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public InterpreterBuilder(Pointer p)
Pointer(Pointer)
.public InterpreterBuilder(@Const @ByRef FlatBufferModel model, @Const @ByRef OpResolver op_resolver, @Const InterpreterOptions options_experimental)
options
object is copied during construction. So caller can release it
after calling the constructor.public InterpreterBuilder(@Const @ByRef FlatBufferModel model, @Const @ByRef OpResolver op_resolver)
public InterpreterBuilder(@Cast(value="const tflite::Model*") Pointer model, @Const @ByRef OpResolver op_resolver, ErrorReporter error_reporter, @Const InterpreterOptions options_experimental, @Const Allocation allocation)
error_reporter
is null, then DefaultErrorReporter() is used.
options
object is copied during construction. So caller can release it
after calling the constructor.@Cast(value="TfLiteStatus") @Name(value="operator ()") public int apply(@UniquePtr Interpreter interpreter)
*interpreter
.
On success, returns kTfLiteOk and sets *interpreter
to a valid
Interpreter.
On failure, returns an error status and sets *interpreter
to nullptr.@Cast(value="TfLiteStatus") @Name(value="operator ()") public int apply(@UniquePtr Interpreter interpreter, int num_threads)
@Cast(value="TfLiteStatus") public int SetNumThreads(int num_threads)
public void AddDelegate(TfLiteDelegate delegate)
public void AddDelegate(TfLiteOpaqueDelegateStruct opaque_delegate)
public void SetTelemetryProfiler(@UniquePtr TelemetryProfiler profiler)
Copyright © 2025. All rights reserved.