googlecreativelab / teachablemachine-community

Example code snippets and machine learning code for Teachable Machine
https://g.co/teachablemachine
Apache License 2.0
1.52k stars 686 forks source link

[BUG]: teachable machine example export for Arduino nano 33 BLE linker error 'cannot move location counter backwards' #402

Closed Herwig9820 closed 1 month ago

Herwig9820 commented 1 month ago

Bug When executing teachable machine example 'tiny image' in order to do inference on a Arduino nano 33 BLE, the model exported is way too large and a linker error occurs. Error: linker_script.ld: 138 cannot move location counter backwards (from 200532b8 to 2003fc00) Error linking for board Arduino Nano 33 BLE(nano33ble) Build failed for project 'tm_template_script' collect2.exe*: error: ld returned 1 exit status

Steps to reproduce the behavior (prerequisite: Arduino library 'Arduino_tensorFlow_Lite' installed on PC) execute teachable machine example 'https://teachablemachine.withgoogle.com/train/tiny_image' in order to do inference on a Arduino nano 33 BLE.

Link to code to reproduce bug https://teachablemachine.withgoogle.com/train/tiny_image : the teachable machine scenario https://github.com/tensorflow/tflite-micro-arduino-examples : the Arduino library library to install https://github.com/googlecreativelab/teachablemachine-community/blob/master/snippets/markdown/tiny_image/GettingStarted.md : teachable machine starting guide

Expected behavior No linker error (model size adapted to intended microcontroller, which is the Arduino nano 33 BLE)

Screenshots Executing the scenario: image image The Arduino project: image

Desktop (please complete the following information):

Smartphone (please complete the following information): (not applicable)

I would appreciate help on this (possibly a workaround). Thanks.

Herwig9820 commented 1 month ago

I found the solution. The picture is too big to store

Herwig9820 commented 1 month ago

see above