class
Utility subclass that enables internal recordings of the MicroInterpreter.
class RecordingMicroInterpreter : public tflite::MicroInterpreterUtility subclass that enables internal recordings of the MicroInterpreter. This class should be used to audit and analyze memory arena usage for a given model and interpreter.
After construction and the first Invoke() or AllocateTensors() call - the memory usage is recorded and available through the GetMicroAllocator() function. See RecordingMicroAlloctor for more details on what is currently recorded from arena allocations.
It is recommended for users to increase the tensor arena size by at least 1kb to ensure enough additional memory is available for internal recordings.
method
tflite::RecordingMicroInterpreter::RecordingMicroInterpreter( const Model *model, const MicroOpResolver &op_resolver, uint8_t *tensor_arena, size_t tensor_arena_size, MicroResourceVariables *resource_variable = nullptr, MicroProfilerInterface *profiler = nullptr)Parameters
| Name | Type | Default | Description |
|---|---|---|---|
model | const Model * | Required | |
op_resolver | const MicroOpResolver & | Required | |
tensor_arena | uint8_t * | Required | |
tensor_arena_size | size_t | Required | |
resource_variable | MicroResourceVariables * | nullptr | |
profiler | MicroProfilerInterface * | nullptr |
method
tflite::RecordingMicroInterpreter::RecordingMicroInterpreter( const Model *model, const MicroOpResolver &op_resolver, RecordingMicroAllocator *allocator, MicroResourceVariables *resource_variable = nullptr, MicroProfilerInterface *profiler = nullptr)Parameters
| Name | Type | Default | Description |
|---|---|---|---|
model | const Model * | Required | |
op_resolver | const MicroOpResolver & | Required | |
allocator | RecordingMicroAllocator * | Required | |
resource_variable | MicroResourceVariables * | nullptr | |
profiler | MicroProfilerInterface * | nullptr |
method
const RecordingMicroAllocator & tflite::RecordingMicroInterpreter::GetMicroAllocator() const