arduino / arduino/ArduinoTensorFlowLiteTutorials
xx bytes lost due to alignment. To avoid this loss, please make sure the tensor_arena is 16 bytes aligned
- Dominant language
- Jupyter Notebook
- Stars
- 270
- Forks
- 122
- PR merge metrics
- No merged PRs in 30d
Description
I get this error message I get when I basically replicate the gesture recognition tutorial in [Arduino ML guide](https://blog.arduino.cc/2019/10/15/get-started-with-machine-learning-on-arduino/).
More importantly, though the arduino sketch builds, the model doesn't appear to be working, since the serial output doesn't report any gestures.
The workaround that worked for me was to change the header in the model.h encoding in the Google Colab ML notebook:
Original: !echo "const unsigned char model[] = {"
What worked for me: !echo "alignas(8)const unsigned char model[] = {"
The addition of alignas(8) fixed the issue in that the arduino sketch build is now working, and I am able to classify gestures.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Google Colab ML notebook command that generates model.h and the Arduino sketch that reports the tensor_arena alignment warning. Reproduce the gesture-recognition build and serial output, then verify that the generated model header is aligned correctly and gestures are classified without the warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- arduino, jupyter-notebook
- Domain
- embedded-iot, machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100