eloquentarduino / EloquentTinyML

Eloquent interface to Tensorflow Lite for Microcontrollers
288 stars 57 forks source link

Fail: "cannot move location counter backwards" #34

Closed iludis21 closed 8 months ago

iludis21 commented 2 years ago

Hello Simone, I used your script to create TinyML models, which should recognize 96x96 grayscale images. In Python everything worked as well, model was created. Only compiling for Nano33 BLE in Arduino does not work. It breaks with the error message "linker_script.ld:138 cannot move location counter backwards (from 20fd4a70 to 2003fc00)". Could you maybe help me further? I get the same error message when I try to compile the exported model from Teachable Machine to Nano 33 BLE.

eloquentarduino commented 2 years ago

Hi never encountered this error. Please share your Arduino sketch and possibly your Python script.

iludis21 commented 2 years ago

problem_011121.zip Here it is. Thanks in advance.

iludis21 commented 2 years ago

test1_0311.zip Hello Simone, the problem has been solved. It was beginner's mistake - model was badly made and way too big (28MB). Fixed and optimized to 1,3MB - now it works. But I have another problem: the input data are int values between 0 and 255, but as output I want to have two float values. But your predict function predict(input, output) supports either int/int or float/float. Can you give me a hint here?

eloquentarduino commented 2 years ago

I will fix the library on this. For now, declare your input as float so you can use the float/float version of predict.

iludis21 commented 2 years ago

Thank you.