Reader small image

You're reading from  TinyML Cookbook - Second Edition

Product typeBook
Published inNov 2023
PublisherPackt
ISBN-139781837637362
Edition2nd Edition
Right arrow
Author (1)
Gian Marco Iodice
Gian Marco Iodice
author image
Gian Marco Iodice

Gian Marco Iodice is team and tech lead in the Machine Learning Group at Arm, who co-created the Arm Compute Library in 2017. The Arm Compute Library is currently the most performant library for ML on Arm, and it's deployed on billions of devices worldwide – from servers to smartphones. Gian Marco holds an MSc degree, with honors, in electronic engineering from the University of Pisa (Italy) and has several years of experience developing ML and computer vision algorithms on edge devices. Now, he's leading the ML performance optimization on Arm Mali GPUs. In 2020, Gian Marco cofounded the TinyML UK meetup group to encourage knowledge-sharing, educate, and inspire the next generation of ML developers on tiny and power-efficient devices.
Read more about Gian Marco Iodice

Right arrow

How can we train a model on microcontrollers?

In every project presented in this book, we have discussed how to run model inference on microcontrollers and demonstrated that even a model like MobileNet v2 can be deployed on these devices. However, is it possible to train a neural network on microcontrollers?

In this recipe, we will answer this question and provide an example of training a simple neural network using backpropagation on the Arduino Nano and Raspberry Pi Pico with the CMSIS-DSP library.

The network will be trained to return the result of the following logical (exclusive OR) XOR and NOT-AND (NAND) operators:

Figure 12.1: The logical XOR and NAND operators

As you can see from the preceding image, the result of the XOR operator is 1 when the binary inputs a and b are different. On the other hand, the output of the NAND operator is 1 when at least one of the binary inputs, a or b, is 0.

Getting ready

Training an ML model using the microcontroller...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
TinyML Cookbook - Second Edition
Published in: Nov 2023Publisher: PacktISBN-13: 9781837637362

Author (1)

author image
Gian Marco Iodice

Gian Marco Iodice is team and tech lead in the Machine Learning Group at Arm, who co-created the Arm Compute Library in 2017. The Arm Compute Library is currently the most performant library for ML on Arm, and it's deployed on billions of devices worldwide – from servers to smartphones. Gian Marco holds an MSc degree, with honors, in electronic engineering from the University of Pisa (Italy) and has several years of experience developing ML and computer vision algorithms on edge devices. Now, he's leading the ML performance optimization on Arm Mali GPUs. In 2020, Gian Marco cofounded the TinyML UK meetup group to encourage knowledge-sharing, educate, and inspire the next generation of ML developers on tiny and power-efficient devices.
Read more about Gian Marco Iodice