Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
TinyML Cookbook - Second Edition

You're reading from  TinyML Cookbook - Second Edition

Product type Book
Published in Nov 2023
Publisher Packt
ISBN-13 9781837637362
Pages 664 pages
Edition 2nd Edition
Languages
Author (1):
Gian Marco Iodice Gian Marco Iodice
Profile icon Gian Marco Iodice

Table of Contents (16) Chapters

Preface 1. Getting Ready to Unlock ML on Microcontrollers 2. Unleashing Your Creativity with Microcontrollers 3. Building a Weather Station with TensorFlow Lite for Microcontrollers 4. Using Edge Impulse and the Arduino Nano to Control LEDs with Voice Commands 5. Recognizing Music Genres with TensorFlow and the Raspberry Pi Pico – Part 1 6. Recognizing Music Genres with TensorFlow and the Raspberry Pi Pico – Part 2 7. Detecting Objects with Edge Impulse Using FOMO on the Raspberry Pi Pico 8. Classifying Desk Objects with TensorFlow and the Arduino Nano 9. Building a Gesture-Based Interface for YouTube Playback with Edge Impulse and the Raspberry Pi Pico 10. Deploying a CIFAR-10 Model for Memory-Constrained Devices with the Zephyr OS on QEMU 11. Running ML Models on Arduino and the Arm Ethos-U55 microNPU Using Apache TVM 12. Enabling Compelling tinyML Solutions with On-Device Learning and scikit-learn on the Arduino Nano and Raspberry Pi Pico 13. Conclusion
14. Other Books You May Enjoy
15. Index

Getting ready

The main advantage we have found in all projects developed with tflite-micro is certainly code portability. Regardless of the target device, the model inference can be accelerated on various devices using almost the same application code, which can be exemplified with the following pseudocode:

model = load_model(tflite_model)
model.allocate_memory()
model.invoke();

In the preceding code snippet, we do the following:

  1. Load the model at runtime with load_model()
  2. Allocate the memory required for the model inference with allocate_memory()
  3. Invoke the model inference with invoke()

When writing the tflite-micro application code, it is not strictly necessary to have prior knowledge of the target microcontroller because the software stack takes advantage of vendor-specific optimized operator libraries (performance libraries) to execute the model efficiently. As a result, the selection of the appropriate set of optimized operators happens...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}