This example shows how to train a 2.5 kB model to generate a sine
wave.
Train the model in the cloud using Google Colaboratory or locally using a Jupyter Notebook.
Estimated Training Time: 10 minutes.
Download Link | hello_world.zip |
---|
The models
directory in the above zip file can be generated by following the instructions in the Training section above. It includes the following 3 model files:
Name | Format | Target Framework | Target Device |
---|---|---|---|
model.pb | Keras SavedModel | TensorFlow | Large-Scale/Cloud/Servers |
model.tflite (2.5 kB) | Integer Only Quantized TFLite Model | TensorFlow Lite | Mobile Devices |
model.cc | C Source File | TensorFlow Lite for Microcontrollers | Microcontrollers |
The final model used to simulate a sine wave is displayed below. It is a simple feed forward deep neural network with 2 fully connected layers with ReLu activations and a final fully connected output layer with as shown below.
This image was derived from visualizing the ‘model.tflite’ file in Netron