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