SparkFun Forums 

Where electronics enthusiasts find answers.

Discussions about carrier boards have here!
#240511
Hi,
I've spent a long time trying and failing to get any Tensorflow examples running on a combination of the Machine Learning Micromod carrier board and the Artemis Micromod processor and was looking for some help or advice.

I started off trying the Arduino library: https://github.com/tensorflow/tflite-mi ... o-examples but the examples in that didnt work.
I then tried the examples from the sparkfun repo: https://github.com/sparkfun/Tensorflow_AIOT2019 but no luck.
Also no luck with https://github.com/advaitjain/tflite-mi ... e-examples,
or the examples from https://github.com/tensorflow/tflite-micro,
and even tried an old version of https://github.com/tensorflow/tensorflow when the micro examples were still in that repo but no luck.

I tried substituting the different tensorflow sub-folders from the above repos into the Arduino library instead of the one it included, and then tested with all the combinations of example code and tensorflow versions but nothing seemed to work.
The most common errors were:
unsupported board
flatbuffers/flatbuffers.h not found
and then lots of other errors that were most commonly "file not found" errors for dependencies or functions names being redefined in different places. Where possible i found the file and moved it to the expected location or changed the path, and renamed functions but generally fixing a chain of errors would just result in finding one that couldn't be fixed without in-depth knowledge of the whole tensorflow ecosystem.

Given that using the Arduino IDE seemed to not be working, i then tried following this tutorial: https://codelabs.developers.google.com/ ... sorflow/#5
which seemed to work with the older version of https://github.com/tensorflow/tensorflow i'd checked out. (although It should be updated for the new tflite-micro repo)
However when it came to it i was unable to flash the board from my computer (Mac running Big Sur 11.5.2). I had followed the steps to install the drivers, so i removed them and then tried, and reinstalled and tried again but with no luck. Each time also trying with the Arduino IDE to flash the board with the Ambiq BootLoader (SBL), from the terminal i would get a no_response error and from the IDE just got "Tries = 3, Upload failed" each time.

Any help or suggestions would be much appriciated.
#240526
See above - also: Try going back to getting a simpler sketch to work; ensure the correct board def files are installed/being used https://learn.sparkfun.com/tutorials/mi ... ware-setup and try getting the basic blink to work - if it's still giving issues, try re-installing the ch340 drivers, a different cable, or a different PC if available

Any changes?
#240532
Thanks for the quick replies.

I have managed to previously (and still can) get simpler code such as Blink and the HM01B0 camera stop motion code working (although the camera required a lot of effort, I've submitted a github issue for it). This was using v2.2.1 of the Sparkfun Apollo3 Boards package as v1.2.1 specified in the tutorial didn't work. (I've just tried uninstalling it and re-installing it with your link to make sure, and I get exactly the same results).

When trying to get the tensorflow examples working I tried two main angles and hit two different problems:

1. When using the Arduino IDE, the Sparkfun Variable Bootloader works well for flashing, however the format/structure that Arduino requires the files to be in created issues. This was because the Arduino tensorflow library (now not a proper library but a github repo: https://github.com/tensorflow/tflite-mi ... o-examples) has examples that are out of date with the tensorflow version it uses and if you try to mix and match other different repos and examples of tensorflow it doesn't go well.
Thank you for the link to the flatbuffer tensorflow issue, I will follow this to see if it helps sort this issue and update once i've tried it.

2. When not using the IDE, I have managed to compile examples ready to be flashed (as the file structure is known by the make file and doesnt have to match Arduinos library structure). When attempting to flash it I get No_Response error which I believe is because it is trying to use the Ambiq Secure Bootloader and not managing, a similar error appears when I try to use the Ambiq Bootloader from Arduino IDE:
Connecting over serial port /dev/cu.usbserial-14430...
Fail
Fail
Fail
Tries = 3
Upload failed
In this case, does the fact that the SVL is working show that drivers and cable are also working and it is a problem with the ambiq bootloader?
Is there a way to set it into Ambiq bootloader mode? (I've tried holding down the Boot button, then pressing reset, then attempting to flash, and then releasing the boot button, but this doesnt help).

Thanks
 Topic permissions

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum