Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
README.md | D | 11-Mar-2024 | 2.5 KiB | 64 | 43 | |
train_hello_world_model.ipynb | D | 11-Mar-2024 | 489 KiB | 3,691 | 3,691 |
README.md
1# Hello World Training 2 3This example shows how to train a 2.5 kB model to generate a `sine` wave. 4 5## Table of contents 6 7- [Overview](#overview) 8- [Training](#training) 9- [Trained Models](#trained-models) 10- [Model Architecture](#model-architecture) 11 12## Overview 13 141. Dataset: Data is generated locally in the Jupyter Notebook. 152. Dataset Type: **Structured Data** 163. Deep Learning Framework: **TensorFlow 2** 174. Language: **Python 3.7** 185. Model Size: **2.5 kB** 196. Model Category: **Regression** 20 21## Training 22 23Train the model in the cloud using Google Colaboratory or locally using a 24Jupyter Notebook. 25 26<table class="tfo-notebook-buttons" align="left"> 27 <td> 28 <a target="_blank" href="https://colab.research.google.com/github/tensorflow/tensorflow/blob/master/tensorflow/lite/micro/examples/hello_world/train/train_hello_world_model.ipynb"><img src="https://www.tensorflow.org/images/colab_logo_32px.png" />Google Colaboratory</a> 29 </td> 30 <td> 31 <a target="_blank" href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/micro/examples/hello_world/train/train_hello_world_model.ipynb"><img src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" />Jupyter Notebook</a> 32 </td> 33</table> 34 35*Estimated Training Time: 10 minutes.* 36 37 38## Trained Models 39 40Download Link | [hello_world.zip](https://storage.googleapis.com/download.tensorflow.org/models/tflite/micro/hello_world_2020_12_28.zip) 41------------- | ------------------------------------------------------------------------------------------------------------------------ 42 43The `models` directory in the above zip file can be generated by following the 44instructions in the [Training](#training) section above. It 45includes the following 3 model files: 46 47| Name | Format | Target Framework | Target Device | 48| :------------- |:-------------|:-------------|-----| 49| `model.pb` | Keras SavedModel | TensorFlow | Large-Scale/Cloud/Servers | 50| `model.tflite` *(2.5 kB)* | Integer Only Quantized TFLite Model | TensorFlow Lite | Mobile Devices| 51| `model.cc` | C Source File | TensorFlow Lite for Microcontrollers | Microcontrollers | 52 53 54## Model Architecture 55 56The final model used to simulate a sine wave is displayed below. It is a 57simple feed forward deep neural network with 2 fully connected layers with 58ReLu activations and a final fully connected output layer with as shown below. 59 60![model_architecture.png](../images/model_architecture.png) 61 62*This image was derived from visualizing the 'model.tflite' file in [Netron](https://github.com/lutzroeder/netron)* 63 64