pkg/utensor: add support to RIOT#12805
Conversation
e182301 to
822c18d
Compare
|
force-pushing a lot... |
Indeed, I'm trying to fix the build issues reported by Murdock. Since no one reviewed yet, I think that's ok :) |
josephnoir
left a comment
There was a problem hiding this comment.
Hi, sorry for taking so long. I left a few comments regarding the C++ code and checked that it works on a board here. As far as I can tell the Makefile stuff looks ok.
822c18d to
ae8e6ff
Compare
|
Thanks for your initial review @josephnoir. I addressed all your comments. I also noticed that the utensor-cli (used to generated the model/weights ccp files) has been updated but the version on pypi is now broken so I opened uTensor/utensor_cgen#97 to provide a fix. |
ae8e6ff to
8a9ded9
Compare
|
Since the test application provides an automatic test script, I ran Murdock with |
Contribution description
This PR adapts the uTensor library to RIOT as a package.
The sample application provided in the tests is just an adaption of the example application given in this blog post.
The application is demonstrating how to load a model (model structure + weights) generated from a trained model to determine a digit in an image.
The model is trained using TensorFlow on the MNIST dataset.
The digit image is loaded in the firmware using the recently introduced blob mechanism. There is a helper Python script added to be able to update the digit binary file easily: this script load the test data from the MNIST dataset and, given the index in the list of image, save the image on disk and display its content. This is handy for the user to be able to compare with the value detected by the firmware.
The model files (c++) are automatically generated by the utensor-cli tool and stored in the
modelssubdirectory of the application. These C++ files (model description + weights) are loaded in the application as an external module.The resulting firmware is quite huge, ~180kiB ROM size, and the package requires C++ support, so a few boards (AVR, MSP430, hifive) cannot be used. It should work on MIPS :)
Testing procedure
The following command should succeed:
Issues/PRs references
None