Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
The TinyML examples written in C++The TinyML examples in C++, ported to the ESP32 can be found at https://github.com/espressif/tflite-micro-esp-examples/tree/master/examples![]() | ||||||||
Changed: | ||||||||
< < | Hello World | |||||||
> > | The Hello World application | |||||||
Changed: | ||||||||
< < | There you can also find procedure to get the examples compiled. Let's start with the hello_world example. | |||||||
> > | There you can also find procedure to get the examples compiled. Let's start with the hello_world example. This example uses a pre-built model that has gone through the training process and it has been quantized to reduce its size such that it can be loaded into the small micro-controller memory. Building, training and quantization is described at https://github.com/tensorflow/tflite-micro/tree/main/tensorflow/lite/micro/examples/hello_world![]() | |||||||
We must first tell the idf.py that we are using an ESP32S3 chip: | ||||||||
Added: | ||||||||
> > | ||||||||
idf.py set-target esp32s3After that we may have to clean previous builds: | ||||||||
Line: 20 to 24 | ||||||||
idf.py flash monitorThe program repeatedly runs the induction for 20 angle values between 0 and 2Π. These values can easily be captured by redirecting the output to a file. I then used an editor to prepare the data to be plotted with gnuplot. | ||||||||
Added: | ||||||||
> > | ||||||||
idf.py flash monitor | tee results.txtFinally I wrote a simple Python program calculating the correct 20 sine values, which allows to compare them to the results from TinyML. ![]() | ||||||||
Added: | ||||||||
> > | Creating the model and training itWhen working with Machine Learning, data play a primordal role because data are used to train the model and therefore influence the opaque algorithm within the model. The model for the hello world example is created with the Python script train.py. | |||||||
-- ![]() Comments | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
|
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Added: | ||||||||
> > |
The TinyML examples written in C++The TinyML examples in C++, ported to the ESP32 can be found at https://github.com/espressif/tflite-micro-esp-examples/tree/master/examples![]() Hello WorldThere you can also find procedure to get the examples compiled. Let's start with the hello_world example. We must first tell the idf.py that we are using an ESP32S3 chip:idf.py set-target esp32s3After that we may have to clean previous builds: idf.py fullcleanand finally we can build the hello_world program: idf.py buildOnce the program is built we can flash it and connect the serial monitor to see the results: idf.py flash monitorThe program repeatedly runs the induction for 20 angle values between 0 and 2Π. These values can easily be captured by redirecting the output to a file. I then used an editor to prepare the data to be plotted with gnuplot. idf.py flash monitor | tee results.txtFinally I wrote a simple Python program calculating the correct 20 sine values, which allows to compare them to the results from TinyML. ![]() ![]() Comments
|