Chapter 1: Introduction to TinyML

Authors' Background

The authors' journey into TinyML started with their work on Digital Signal Processors (DSPs) on Android phones. These DSPs are always on, listening for the "OK Google" wake words. Despite their always-on state, they operate with just tens of kilobytes in RAM and consume only a few milliwatts of power.

Power Consumption

One of the key questions the book aims to address is how to run a neural network at an energy cost of less than 1 milliwatt. Achieving this level of efficiency would mean that a simple coin cell battery could power the device for an entire year.

Cost Factors

Another critical aspect to consider is the cost. 32-bit Microcontrollers (MCUs) are now quite affordable, costing less than a dollar each. This low cost makes them a viable option for TinyML applications.

Complexity and Prototyping

Embedded systems are inherently complex to develop and deploy. However, platforms like Arduino have made quick prototyping possible, enabling developers to test ideas and iterate designs more efficiently.

Constraints

Embedded systems operate under several constraints, primarily memory. Unlike systems that can run full-fledged Linux, POSIX, or standard C libraries, embedded systems have to be more conservative. Functions like new and malloc can lead to heap fragmentation, presenting another set of challenges.