Introduction to Google TensorFlowTensorFlow (TF) is an end-to-end open-source platform for machine learning. It has a comprehensive, flexible ecosystem of tools, libraries, and community resources that lets researchers push the state-of-the-art in ML, and developers easily build and deploy ML-powered applications.While TensorFlow Lite (TFL) for Microcontrollers is designed to run machine learning models on microcontrollers and other devices with only a few kilobytes of memory. The core runtime just fits in 16 KB on an Arm Cortex M3 and can run many basic models. It doesn't require operating system support, any standard C or C++ libraries, or dynamic memory allocation.Ameba and TensorFlow Lite TFLAmeba is an easy-to-program platform for developing all kinds of IoT applications. AmebaD is equipped with various peripheral interfaces, including WiFi, GPIO INT, I2C, UART, SPI, PWM, ADC. Through these interfaces, AmebaD can connect with electronic components such as LED, switches, manometer, hygrometer, PM2.5 dust sensors, …etc.Hello World Example Running on Ameba RTL8722DM
Example GuideDownload the Ameba customized version of TensorFlow Lite for Microcontrollers library at ambiot/ambd_arduino.Follow the instructions at Arduino - Libraries to install it.Ensure that the patch files found at ambiot/ambd_arduino are also installed.Open the example, “Files” -> “Examples” -> “TensorFlowLite_Ameba” -> “hello_world”.
Upload the code and press the reset button on Ameba once the upload is finished.Connect the LED to digital pin 10 and ground, ensuring that the polarity is correct. You should see the LED fade in and out rapidly.In the Arduino serial plotter, you can see the output value of the Tensorflow model plotted as a graph, it should resemble a sine wave.
Comments