Machine Learning with TensorFlow Lite


Authors: Pete Warden and Daniel Situnayake
Publisher: O’Reilly
Date: December 2019
Pages: 504
ISBN: 978-1492052043
Print: 1492052043
Kindle: B082TY3SX7
Audience: Developers focused on machine studying
Rating: 5, however see reservations
Reviewer: Harry Fairhead
Can such small machines actually do ML?

The very apparent reply isn’t any however this does not cease them implementing fashions constructed by different machines and this may be helpful. Putting Machine Learning (ML) into observe is troublesome you probably have a robust GPU-equipped machine to crunch the numbers it’s much more difficult when coupled with the necessity to use a system on a chip or different small embedded machine. However, it may be accomplished and it may be accomplished with out having handy over all the heavy computation to the cloud. Devices reminiscent of Alexa and different voice assistants implement sufficient speech recognition to detect their wake phrase utilizing simply native processing, for instance.

TensorFlow Lite is a lower down model of TensorFlow that runs on small machines and this e book reveals you learn how to apply it to Arduino Nano 33 BLE, the Sparkfun Edge and the STM32F746G Discovery Kit – though solely the primary two are utilized in all the chapters. This most undoubtedly is not a e book for you if you will complain {that a} explicit model of a processor is not supported, and even when you anticipate every part to simply work. This is not an entire resolution to something however somewhat a companion that can make it easier to get issues working, so long as you are ready to grasp and to debug. 

The first six chapters concentrate on a “hello world” instance appropriate for ML. Starting off from some primary concepts of ML we rapidly implement a prediction algorithm for some noisy information. None of that is virtually helpful, other than making you perceive how the entire thought works – which in fact may be very helpful. Most of the programming is in Python constructed on a desktop machine. It is simply in Chapter 6 can we transfer on and learn how to put in the mannequin on the three instance microcontroller methods. This is the place you might be probably to run into difficulties as a result of that is an space the place documentation is poor and issues change with out discover. You will probably need to do some impartial work at this level. 

After this six-chapter introductory venture the e book strikes on to extra sensible tasks. Chapters 7 and eight implement a wake phrase detector and makes use of the audio capabilties of the {hardware}. The closing venture as offered within the e book would not appear to be adequate for use in observe because it has low accuracy, however when you perceive the concepts there’s nothing stopping you from spending the hours it will probably take to get to one thing workable.

Chapters 9 and 10 repeat the essential steps solely this time for an individual detection mannequin. Obviously on this case you want a video digicam and that is more likely to improve the problem of getting every part to work. In this case the ML mannequin used is extra sophisticated and you will want to learn up on idea if you wish to go additional.

Chapters 11 and 12 are about gesture recognition utilizing the onboard accelerometer. As earlier than, the outcomes aren’t adequate to deploy in something actual, however once more you may put within the work and prolong them to one thing helpful.

The closing a part of the e book, chapters 13 to 21, are about common points somewhat than tasks. Chapter 13 is a reasonably lengthy chapter on how TensorFlow Lite works and learn how to use it in additional adventurous methods. Chapter 14 is a reasonably waffly account of making your individual ML utility and most of it ought to be apparent by this level within the e book. Chapter 15 is about rushing up the mannequin – i.e. efficiency optimization. Chapter 16 offers with energy consumption and clearly that is very depending on the machine you propose to make use of, but it surely has some common recommendation and goes into learn how to measure energy consumption. Chapter 17 is about decreasing the scale of fashions so that there’s some RAM left over. Chapter 18 is about debugging – not a lot code debugging as mannequin debugging. Chapter 19 is about porting fashions from the massive TensorFlow to the little TensorFlow Lite. Chapter 20 seems briefly on the necessary problems with privateness and safety and has a single paragraph on shifting from improvement to manufacturing. The closing chapter is a few suggestions on learn how to be taught extra.

Overall it is a excellent e book in order for you some examples of learn how to get a mannequin engaged on TensorFlow Lite. If you anticipate the e book to easily information you thru some type of business or “real” implementation of any explicit venture then this isn’t the e book for you – I additionally doubt that such a e book may exist.

This will not be a equipment of components you may merely bolt onto no matter you might be engaged on. It is a get-you-started with ML on small units. It lacks any fairly deep protection of neural networks but when it did it must repeat what’s already accessible in different books. You actually do must study fashions usually after which specialize to fashions appropriate for small {hardware}. It additionally would not take care of any of the issues of programming the microcontrollers it makes use of – you might be anticipated to already find out about such issues.

As lengthy as you are not anticipating closing completed options handed to you on a plate, it is a good solution to get began.


For suggestions of different books on Machine Learning see AI Books To Inspire You in our Programmer’s Bookshelf section.

To sustain with our protection of books for programmers, observe @bookwatchiprog on Twitter or subscribe to I Programmer’s Books RSS feed for every day’s new addition to Book Watch and for brand spanking new critiques.



Please enter your comment!
Please enter your name here