Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
The tinyML Hello World exampleHow does tinyML hello world work? | ||||||||
Changed: | ||||||||
< < | The program takes a value between 0 and 2Π and outputs the corresponding sine value. Of course this could be simply done passing through the sin function of the mathematics library. For demo purposes a neural network is created and trained by feeding it 1000 angle and sin(angle) pairs training it what the sin function is supposed to do. The trained model is converted from TensorFlow to TensorFlow Lite format and finally 'quantized' replacing the float values of the output model by int8 values thus drastically reducing the size of the model. The final model is transformed into char array within a C++ source file. This source file can finally easily be included into a C++ program running on the target processor (ESP32). | |||||||
> > | The program takes a value between 0 and 2Π and outputs the corresponding sine value. Of course, this could be simply done passing through the sin function of the mathematics library. For demo purposes a neural network is created and trained by feeding it 1000 angle and sin(angle) pairs training it what the sin function is supposed to do. The trained model is converted from TensorFlow to TensorFlow Lite format and finally 'quantized' replacing the float values of the output model by int8 values thus drastically reducing the size of the model. The final model is transformed into a char array within a C++ source file. This source file can finally easily be included into a C++ program running on the target processor (ESP32). | |||||||
Model Creation
The model creation process is described in https://github.com/tensorflow/tflite-micro/tree/main/tensorflow/lite/micro/examples |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
The tinyML Hello World exampleHow does tinyML hello world work? | ||||||||
Line: 8 to 8 | ||||||||
The model creation process is described in https://github.com/tensorflow/tflite-micro/tree/main/tensorflow/lite/micro/examples![]() ![]() ![]() ![]() | ||||||||
Changed: | ||||||||
< < | Unfortunately the process of TensorFlow model creation has been changed with respect to the description in the book and the jupyter notebook create_sine_model.ipynb creating the model cannot be found any longer in the github repository. It has been replaced by the Python script train.py. | |||||||
> > | Unfortunately the process of TensorFlow model creation has been changed with respect to the description in the book and the jupyter notebook create_sine_model.ipynb creating the model cannot be found any longer in the github repository. It has been replaced by the Python script train.py.
The hello_world example for the ESP32
The tinyML examples for the ESP32 are available for builds with esp-idf In the plot below, the blue values correspond to the input for the model (values 0 .. 2 Π) and the red values are the output from invocation.
| |||||||
-- ![]()
Comments
| ||||||||
Added: | ||||||||
> > |
|
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Added: | ||||||||
> > |
The tinyML Hello World exampleHow does tinyML hello world work?The program takes a value between 0 and 2Π and outputs the corresponding sine value. Of course this could be simply done passing through the sin function of the mathematics library. For demo purposes a neural network is created and trained by feeding it 1000 angle and sin(angle) pairs training it what the sin function is supposed to do. The trained model is converted from TensorFlow to TensorFlow Lite format and finally 'quantized' replacing the float values of the output model by int8 values thus drastically reducing the size of the model. The final model is transformed into char array within a C++ source file. This source file can finally easily be included into a C++ program running on the target processor (ESP32). Model Creation
The model creation process is described in https://github.com/tensorflow/tflite-micro/tree/main/tensorflow/lite/micro/examples
Unfortunately the process of TensorFlow model creation has been changed with respect to the description in the book and the jupyter notebook create_sine_model.ipynb creating the model cannot be found any longer in the github repository. It has been replaced by the Python script train.py.
Comments
|