Fix for hello_world memory error
PiperOrigin-RevId: 312707164 Change-Id: Ibdc1b5bd2161daa093cc79f165c03ac5a6c99acc
This commit is contained in:
parent
c030682e9c
commit
5d3ad40d11
|
@ -34,8 +34,12 @@ TfLiteTensor* output = nullptr;
|
||||||
int inference_count = 0;
|
int inference_count = 0;
|
||||||
|
|
||||||
// Create an area of memory to use for input, output, and intermediate arrays.
|
// Create an area of memory to use for input, output, and intermediate arrays.
|
||||||
// Finding the minimum value for your model may require some trial and error.
|
// Minimum arena size, at the time of writing. After allocating tensors
|
||||||
constexpr int kTensorArenaSize = 2 * 1024;
|
// you can retrieve this value by invoking interpreter.arena_used_bytes().
|
||||||
|
const int kModelArenaSize = 2352;
|
||||||
|
// Extra headroom for model + alignment + future interpreter changes.
|
||||||
|
const int kExtraArenaSize = 560 + 16 + 100;
|
||||||
|
const int kTensorArenaSize = kModelArenaSize + kExtraArenaSize;
|
||||||
uint8_t tensor_arena[kTensorArenaSize];
|
uint8_t tensor_arena[kTensorArenaSize];
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue