tflite:: impl:: Interpreter
Summary
Constructors and Destructors |
|
---|---|
Interpreter(ErrorReporter *error_reporter)
|
|
Interpreter(const Interpreter &)
|
|
~Interpreter()
|
Public types |
|
---|---|
TfLiteDelegatePtr
|
usingstd::unique_ptr< TfLiteDelegate, void(*)(TfLiteDelegate *)>
|
Public static attributes |
|
---|---|
kTensorsCapacityHeadroom = 16
|
constexpr int
The capacity headroom of
tensors_ vector before calling ops' prepare and invoke function. |
kTensorsReservedCapacity = 128
|
constexpr int
|
Friend classes |
|
---|---|
tflite::impl::InterpreterBuilder
|
friend class
|
Public functions |
|
---|---|
AddProfiler(Profiler *profiler)
|
void
\warning This is an experimental API and subject to change.
|
AddProfiler(std::unique_ptr< Profiler > profiler)
|
void
\warning This is an experimental API and subject to change.
|
AllocateTensors()
|
TfLiteStatus
Update allocations for all tensors.
|
ApplyOptions(InterpreterOptions *options)
|
TfLiteStatus
\warning This is an experimental API and subject to change.
|
Cancel()
|
TfLiteStatus
\warning This is an experimental API and subject to change.
|
EnsureTensorDataIsReadable(int tensor_index)
|
TfLiteStatus
\warning This is an experimental API and subject to change.
|
GetAllowFp16PrecisionForFp32() const
|
bool
\warning Experimental interface, subject to change.
|
GetAsyncSignatureRunner(const char *signature_key)
|
async::AsyncSignatureRunner *
\warning Experimental interface, subject to change.
|
GetBufferHandle(int tensor_index, TfLiteBufferHandle *buffer_handle, TfLiteDelegate **delegate)
|
TfLiteStatus
\warning This is an experimental API and subject to change.
|
GetInputName(int index) const
|
const char *
Return the name of a given input.
|
GetOutputName(int index) const
|
const char *
Return the name of a given output.
|
GetProfiler()
|
Profiler *
\warning This is an experimental API and subject to change.
|
GetSignatureRunner(const char *signature_key)
|
SignatureRunner *
Returns a pointer to the SignatureRunner instance to run the part of the graph identified by a SignatureDef.
|
GetSubgraphIndexFromSignature(const char *signature_key) const
|
int
\warning Experimental interface, subject to change.
|
Invoke()
|
TfLiteStatus
Invoke the interpreter (run the whole graph in dependency order).
|
ModifyGraphWithDelegate(TfLiteDelegate *delegate)
|
TfLiteStatus
Allow a delegate to look at the graph and modify the graph to handle parts of the graph themselves.
|
ModifyGraphWithDelegate(TfLiteOpaqueDelegateStruct *delegate)
|
TfLiteStatus
|
ModifyGraphWithDelegate(std::unique_ptr< Delegate, Deleter > delegate)
|
TfLiteStatus
\warning This is an experimental API and subject to change.
|
ModifyGraphWithDelegate(std::unique_ptr< TfLiteDelegate > delegate)=delete
|
TfLiteStatus
This overload is never OK.
|
OpProfilingString(const TfLiteRegistration & op_reg, const TfLiteNode *node) const
|
const char *
Retrieve an operator's description of its work, for profiling purposes.
|
ReleaseNonPersistentMemory()
|
TfLiteStatus
\warning Experimental interface, subject to change.
|
ResetVariableTensors()
|
TfLiteStatus
\warning This is an experimental API and subject to change.
|
ResizeInputTensor(int tensor_index, const std::vector< int > & dims)
|
TfLiteStatus
Change the dimensionality of a given tensor.
|
ResizeInputTensorStrict(int tensor_index, const std::vector< int > & dims)
|
TfLiteStatus
Change the dimensionality of a given tensor.
|
SetAllowBufferHandleOutput(bool allow_buffer_handle_output)
|
void
\warning This is an experimental API and subject to change.
|
SetAllowFp16PrecisionForFp32(bool allow)
|
void
Allow float16 precision for FP32 calculation when possible.
|
SetBufferHandle(int tensor_index, TfLiteBufferHandle buffer_handle, TfLiteDelegate *delegate)
|
TfLiteStatus
\warning This is an experimental API and subject to change.
|
SetBufferHandle(TfLiteTensor *tensor, TfLiteBufferHandle buffer_handle, TfLiteDelegate *delegate)
|
TfLiteStatus
\warning This is an experimental API and subject to change.
|
SetCancellationFunction(void *data, bool(*)(void *) check_cancelled_func)
|
void
\warning This is an experimental API and subject to change.
|
SetCustomAllocationForTensor(int tensor_index, const TfLiteCustomAllocation & allocation, int64_t flags)
|
TfLiteStatus
Assigns (or reassigns) a custom memory allocation for the given tensor.
|
SetExternalContext(TfLiteExternalContextType type, TfLiteExternalContext *ctx)
|
void
|
SetNumThreads(int num_threads)
|
TfLiteStatus
Set the number of threads available to the interpreter.
|
SetProfiler(Profiler *profiler)
|
void
\warning This is an experimental API and subject to change.
|
SetProfiler(std::unique_ptr< Profiler > profiler)
|
void
\warning This is an experimental API and subject to change.
|
error_reporter() const
|
\warning Experimental interface, subject to change.
|