# recordingmicrointerpreter

Interpreter variant exposing the recording allocator.

## tflite::RecordingMicroInterpreter

`class` · `cpp`

```cpp
class RecordingMicroInterpreter : public tflite::MicroInterpreter
```

Utility 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.

Source: `tensorflow/lite/micro/recording_micro_interpreter.h:36`

### tflite::RecordingMicroInterpreter::RecordingMicroInterpreter--classtflite_1_1RecordingMicroInterpreter_1ac0b37415daa2952507f5cbfcce938c4b

`method` · `cpp`

```cpp
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 |  |

Source: `tensorflow/lite/micro/recording_micro_interpreter.h:38`

### tflite::RecordingMicroInterpreter::RecordingMicroInterpreter--classtflite_1_1RecordingMicroInterpreter_1acc331368615826bbfb01748d9f6d9466

`method` · `cpp`

```cpp
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 |  |

Source: `tensorflow/lite/micro/recording_micro_interpreter.h:50`

### tflite::RecordingMicroInterpreter::GetMicroAllocator

`method` · `cpp`

```cpp
const RecordingMicroAllocator & tflite::RecordingMicroInterpreter::GetMicroAllocator() const
```

Source: `tensorflow/lite/micro/recording_micro_interpreter.h:59`
