Errata

TinyML

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Printed, PDF Additional

Hi,

I highly enjoyed this book and like the content/subject matter. This is not an errata but rather a suggestion that a future version of the book could also use other popular controller like Google coral (coral.ai) as this code samples will be very useful to run on this device as well

Thanks for the great work!


Anonymous  Jan 06, 2021 
Printed, PDF, Other Digital Version Page Output_handler
304

Hello! Good Morning!
My names David
I bought the book and I love it!
congratulations on the edit!
I have a doubt! How to make the application of gestures using numbers to turn on the RGB leds of the Arduino Nano 33 Ble Sense board?

I would like to use 1,6 and 9 for red, green and blue. can you help me?

David  Aug 31, 2022 
PDF Page chapter 4
chapter 4

Following the erratta, the following link should be used, which seems
not exist anymore.
/github/tensorflow/tensorflow/blob/master/tensorflow/lite/micro/examples/hello_world/train/train_hello_world_model.ipynb

Scrolling down on github, the folder "tensorflow/lite/micro" only
contains only an readme.md file, annoucing: "As of June 25, 2021, the
TFLM codebase has moved to a stand-alone github repository."
From that point onwards Iḿ lost, not being able to find
"train_hello_.world_model.ipynb"

Therefore, I cannot run the train_hello_world_model in Colab and cannot
continue with chapter 4 :(

Following the erratta, the following link should be used, which does not
exist anymore.
github/tensorflow/tensorflow/blob/master/tensorflow/lite/micro/examples/hello_world/train/train_hello_world_model.ipynb

Willy Bolwerk  Jul 31, 2023 
Printed Page hello world example
chapters in hello world

The hello world example has changed fundamentally and the all the chapters about the hello world exampled are now irrelevant. It would be good to have these chapters entirely re-written.
The code described in the book has disappeared from the git repository.
I could not find an explanation of the new version anywhere on the WEB and study of the source code seems to be the only way to understand what is going on.
Since this is the introductory example into the subject, this does not really help a beginner to TinyML

Uli Raich  Sep 03, 2023 
Printed Page 34
Problems Loading the Notebook, para 1

The location of the ipynb file has moved since Duncan Wilson's update.

The link should read:

https://colab.research.google.com/github/tensorflow/tflite-micro/blob/main/tensorflow/lite/micro/examples/hello_world/train/train_hello_world_model.ipynb

John Robinson  Aug 10, 2021 
Printed Page 43
first line of code

The first line must import Keras from Tensorflow. Keras is now separate from Tensorflow, so:
form tf.keras import layers must now be:
import keras
from keras import layer

Dick Juffermans  Jul 16, 2023 
PDF Page 58
top page: first bullet point

I don't think the metrics are better for validation than training. At least, the graphs the page before don't show that.

Raphael Ribard  Nov 16, 2020 
PDF Page 79
framed note

The vector has 3 elements not 6

Raphael Ribard  Nov 16, 2020 
Printed Page 84
1st paragraph

Donwloaded git and make 4.3 thorugh chocolatey.
After running make -f tensorflow/lite/micro/tools/make/Makefile test_hello_world_test from page 84 in the book the following comes up:

C:\Users\zalan\tensorflow>make -f tensorflow/lite/micro/tools/make/Makefile test_hello_world_test
process_begin: CreateProcess(NULL, uname -m, ...) failed.
tensorflow/lite/micro/tools/make/Makefile:32: pipe: No error
-m was unexpected at this time.
FIND: Parameter format not correct
make: *** No rule to make target 'test_hello_world_test'. Stop.

Downloaded ubuntu and tired running it from there and it didn't work either. I got the following:
zal_n@LAPTOP-74R8EDS8:/mnt/c/users/zalan/tensorflow$ make -f tensorflow/lite/micro/tools/make/Makefile test_hello_world_test
tensorflow/lite/micro/tools/make/Makefile:306: warning: overriding recipe for target 'tensorflow/lite/micro/tools/make/downloads/ruy'
tensorflow/lite/micro/tools/make/Makefile:306: warning: ignoring old recipe for target 'tensorflow/lite/micro/tools/make/downloads/ruy'
tensorflow/lite/micro/tools/make/Makefile:306: warning: overriding recipe for target 'tensorflow/lite/micro/tools/make/downloads/person_model_grayscale'
tensorflow/lite/micro/tools/make/Makefile:306: warning: ignoring old recipe for target 'tensorflow/lite/micro/tools/make/downloads/person_model_grayscale'
tensorflow/lite/micro/tools/make/Makefile:306: warning: overriding recipe for target 'tensorflow/lite/micro/tools/make/downloads/person_model_int8'
tensorflow/lite/micro/tools/make/Makefile:306: warning: ignoring old recipe for target 'tensorflow/lite/micro/tools/make/downloads/person_model_int8'
tensorflow/lite/micro/tools/make/download_and_extract.sh "https://github.com/google/gemmlowp/archive/719139ce755a0f31cbf1c37f7f98adcc7fc9f425.zip" "7e8191b24853d75de2af87622ad293ba" tensorflow/lite/micro/tools/make/downloads/gemmlowp
tensorflow/lite/micro/tools/make/download_and_extract.sh: line 16: $'\r': command not found
tensorflow/lite/micro/tools/make/download_and_extract.sh: line 24: $'\r': command not found
: invalid optionmicro/tools/make/download_and_extract.sh: line 25: set: -
set: usage: set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]
tensorflow/lite/micro/tools/make/download_and_extract.sh: line 26: $'\r': command not found
tensorflow/lite/micro/tools/make/download_and_extract.sh: line 28: syntax error near unexpected token `$'{\r''
'ensorflow/lite/micro/tools/make/download_and_extract.sh: line 28: `patch_am_sdk() {
make: *** [tensorflow/lite/micro/tools/make/Makefile:306: tensorflow/lite/micro/tools/make/downloads/gemmlowp] Error 2

Zalan Nemeth  Aug 26, 2020 
Printed Page 84
first line

I am executing the command
make -f tensorflow/lite/micro/tools/make/Makefile test_hello_world_test and I am getting the error below. I searched online for a solution to this issue, and the answer that I got from github is that TFLite is not supported on Windows?
Is this correct? Could you please help resolve this or point me to the right forum to get it resolved?
Thanks a lot!
Cheers,
Mushtaq

1650K .......... .......... .......... .......... .......... 98% 1.58M 0s
1700K .......... ......... 100% 1.14M=1.3s

2021-03-03 05:02:11 (1.28 MB/s) - `/tmp/dca12522a9f9e37f126ab925fd385c807ab4f84e.zip' saved [1760478/1760478]

tensorflow/lite/micro/tools/make/bash_helpers.sh: line 29: /tmp/dca12522a9f9e37f126ab925fd385c807ab4f84e.zip: No such file or directory
tensorflow/lite/micro/tools/make/Makefile:525: *** Something went wrong with the flatbuffers download: Bad checksum. Expected: aa9adc93eb9b33fa1a2a90969e48baee, Got: . Stop.

Anonymous  Mar 03, 2021 
Printed Page 87
Using Make to run the tests

After running the git command inside my drive C:\

git clone https://github.com/tensorflow/tensorflow.git

I have now c:\tensoflow with all files ok if compared to github

BUT This command:

make -f tensorflow/lite/micro/tools/make/Makefile test_hello_world_test

DO NOT EXECUTE

C:\tensorflow>make -f tensorflow/lite/micro/tools/make/Makefile test_hello_world_test

process_begin: CreateProcess(NULL, uname -m, ...) failed.
-m was unexpected at this time.
FIND: Parameter format not correct
make: *** No rule to make target `test_hello_world_test'. Stop.

C:\tensorflow>

I tried many variations but no success

Vidal Pereira da Silva Junior  Jun 27, 2020 
110
chapter 5 building an application, paragraph : running our application

After cloning the GIT repo on my local machine ( Windows 10 ) and installing the make command through Choco in powershell, I try to run the command for either building the test or application binary ( make -f tensorflow/../../Makefile hello_world but get an error as follows:
############
PS C:\WINDOWS\system32\tensorflow\tensorflow\lite\micro\tools\make> make -f .\Makefile hello_world
make: .\Makefile: No such file or directory
make: *** No rule to make target '.\Makefile'. Stop.
###########
I also tried this on GCP and was able to build the application binary file but that binary file can't be executed:
################################
sidhom_slim@cloudshell:~/tensorflow (polar-reef-305008)$ bash tensorflow/lite/micro/tools/make/gen/linux_x86_64_default/bin/hello_world
tensorflow/lite/micro/tools/make/gen/linux_x86_64_default/bin/hello_world: tensorflow/lite/micro/tools/make/gen/linux_x86_64_default/bin/hello_world: cannot execute binary file
#############################
Does this look like an error due to the different compilers used if I get it right?
Else what is the issue please and how can this be fixed?
if this is not the right forum for asking such questions, where can I get help?
Thank you in advance for your kind support.

Slim Sidhom  May 17, 2021 
Printed, PDF Page 112
1st paragraph.


Hi,
I just bough a printed copy, I follow the instruction of the book and get this error.. I am very not happy because of only this below error but a lot of other information in this book is out of date, especailly related to git repository of tensorflow and tensorflow lite.

Try to compile for target=sparkfun_edge:

make -f tensorflow/lite/micro/tools/make/Makefile TARGET=sparkfun_edge hello_world_bin


Result:
tensorflow/lite/micro/tools/make/Makefile:494: tensorflow/lite/micro/tools/make/targets/sparkfun_edge_makefile.inc: No such file or directory
make: *** No rule to make target 'tensorflow/lite/micro/tools/make/targets/sparkfun_edge_makefile.inc'. Stop.

Regards
Duy

nguyen quoc duy  Jan 10, 2022 
Printed, PDF Page 268 and 269 and following
Last paragraph

link tinymlbook/persondetector is dead.
Then I am trying to follow the instructions to train the person detection model on page 269 and following. I follow the instruction to update the PYTHONPATH, using the absolute address of where models/research/slim is located but I get:
ModuleNotFoundError: No module named 'tf_slim'
I can install tf_slim with pip but then I get:

ModuleNotFoundError: No module named 'tensorflow.contrib'

tensorflow.contrib seems to have been removed in tensorflow version 2.

What is the correct way to go?

Uli Raich  Jan 14, 2022 
Printed Page 271
Last but one line

In the printout it says sec/step while in the text you speak about steps-per-second

Uli Raich  Jan 14, 2022