Skip to content

Calculate arena size for TensorFlow Lite Micro models #35070

@petewarden

Description

@petewarden

TensorFlow Lite for Microcontrollers doesn't depend on dynamic memory allocation, so it requires users to supply a memory arena when an interpreter is created, as described in this documentation:
https://www.tensorflow.org/lite/microcontrollers/get_started
We need a better way to decide 'tensor_arena_size'. Currently, the above page says 'The size required will depend on the model you are using, and may need to be determined by experimentation.'

The simplest solution might be an offline script that returns the size needed to hold a model's activation buffers, but this won't include miscellaneous or platform-dependent allocations in its total. Another approach might be to return the size needed as an integer along with the error report string from the interpreter creation.

Metadata

Metadata

Assignees

Labels

comp:microRelated to TensorFlow Lite MicrocontrollersstaleThis label marks the issue/pr stale - to be closed automatically if no activitystat:awaiting responseStatus - Awaiting response from author

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions