Errata

TinyML

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

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

Version Location Description Submitted By Date submitted Date corrected
Printed
Page 34
2nd para

Link to Colab notebook incorrect - the ipynb file has moved one level down into a subfolder called train - https://colab.research.google.com/github/tensorflow/tensorflow/blob/master/tensorflow/lite/micro/examples/hello_world/train/train_hello_world_model.ipynb

Note from the Author or Editor:
Update the link so it reads as follows:

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

Duncan Wilson  May 09, 2020  Aug 07, 2020
Printed
Page 61
2nd and 4th blocks of code

The comma is is not in the correct place in the open() functions of the code example. The comma should be between the arguments and not part of the first one.

#Save the model to disk
open("sine_model.tflite," "wb").write(tflite_model)

should be: open("sine_model.tflite", "wb").write(tflite_model)


The same for the last open() in the example.

Note from the Author or Editor:
Fix as described above

Anonymous  Feb 20, 2020  Aug 07, 2020
Printed
Page 66
Code snippet

Instead of:
open("sine_model.tflite," "wb").write(tflite_model)
Should be:
open("sine_model.tflite", "wb+").write(tflite_model)

Instead of:
open("sine_model_quantized.tflite," "wb").write(tflite_model)
Should be:
open("sine_model_quantized.tflite", "wb+").write(tflite_model)

1. The misplaced comma ignores the second parameter
2. The "+" permits the file to be created if it does not exist

Kind regards.

Note from the Author or Editor:
Fix the comma placement, but do not add the "+"

Matha Goram  Feb 10, 2020  Aug 07, 2020
Printed
Page 69
top paragraph

https://oreil.ly/s0f6Q hyperlink is broken.

Note from the Author or Editor:
The link should be updated to point here:

https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/micro/examples/hello_world/hello_world_test.cc

MICHAEL E STANLEY  Mar 14, 2020  Aug 07, 2020
Other Digital Version
187
Install dependencies

ERROR: Could not find a version that satisfies the requirement tf-estimator-nightly==2.1.0.dev202001230 (from versions: 1.12.0.dev20181101, 1.12.0.dev20181105, 1.12.0.dev20181114, 1.12.0.dev20181115, 1.12.0.dev20181116, 1.12.0.dev20181117, 1.12.0.dev20181118, 1.12.0.dev20181119, 1.12.0.dev20181120, 1.12.0.dev20181121, 1.12.0.dev20181122, 1.12.0.dev20181123, 1.12.0.dev20181124, 1.12.0.dev20181125, 1.12.0.dev20181126, 1.12.0.dev20181127, 1.12.0.dev20181128, 1.12.0.dev20181129, 1.12.0.dev20181201, 1.12.0.dev20181202, 1.12.0.dev20181203, 1.12.0.dev20181204, 1.12.0.dev20181205, 1.12.0.dev20181206, 1.12.0.dev20181207, 1.12.0.dev20181208, 1.12.0.dev20181214, 1.12.0.dev20181215, 1.12.0.dev20181216, 1.12.0.dev20181217, 1.13.0.dev2019010910, 1.13.0.dev2019011813, 1.13.0.dev2019011901, 1.13.0.dev2019012001, 1.13.0.dev2019012101, 1.13.0.dev2019012201, 1.13.0.dev2019012415, 1.13.0.dev2019012416, 1.13.0.dev2019012501, 1.13.0.dev2019012601, 1.13.0.dev2019012701, 1.13.0.dev2019012801, 1.13.0.dev2019012901, 1.14.0.dev2019020414, 1.14.0.dev2019020601, 1.14.0.dev2019020710, 1.14.0.dev2019020801, 1.14.0.dev2019020901, 1.14.0.dev2019021001, 1.14.0.dev2019021101, 1.14.0.dev2019021201, 1.14.0.dev2019021301, 1.14.0.dev2019021401, 1.14.0.dev2019021501, 1.14.0.dev2019021601, 1.14.0.dev2019021701, 1.14.0.dev2019021801, 1.14.0.dev2019021901, 1.14.0.dev2019022001, 1.14.0.dev2019022101, 1.14.0.dev2019022201, 1.14.0.dev2019022301, 1.14.0.dev2019022401, 1.14.0.dev2019022501, 1.14.0.dev2019022601, 1.14.0.dev2019022701, 1.14.0.dev2019022801, 1.14.0.dev2019030111, 1.14.0.dev2019030115, 1.14.0.dev2019030201, 1.14.0.dev2019030301, 1.14.0.dev2019030401, 1.14.0.dev2019030501, 1.14.0.dev2019030601, 1.14.0.dev2019030701, 1.14.0.dev2019030801, 1.14.0.dev2019030901, 1.14.0.dev2019031001, 1.14.0.dev2019031101, 1.14.0.dev2019031201, 1.14.0.dev2019031301, 1.14.0.dev2019031401, 1.14.0.dev2019031501, 1.14.0.dev2019031601, 1.14.0.dev2019031701, 1.14.0.dev2019031801, 1.14.0.dev2019031901, 1.14.0.dev2019032001, 1.14.0.dev2019032101, 1.14.0.dev2019032201, 1.14.0.dev2019032301, 1.14.0.dev2019032401, 1.14.0.dev2019032501, 1.14.0.dev2019032601, 1.14.0.dev2019032701, 1.14.0.dev2019032801, 1.14.0.dev2019032901, 1.14.0.dev2019033001, 1.14.0.dev2019033101, 1.14.0.dev2019040101, 1.14.0.dev2019040201, 1.14.0.dev2019040301, 1.14.0.dev2019040401, 1.14.0.dev2019040501, 1.14.0.dev2019040811, 1.14.0.dev2019040815, 1.14.0.dev2019040901, 1.14.0.dev2019041001, 1.14.0.dev2019041101, 1.14.0.dev2019041201, 1.14.0.dev2019041301, 1.14.0.dev2019041401, 1.14.0.dev2019041501, 1.14.0.dev2019041601, 1.14.0.dev2019041818, 1.14.0.dev2019041901, 1.14.0.dev2019042001, 1.14.0.dev2019042101, 1.14.0.dev2019042201, 1.14.0.dev2019042301, 1.14.0.dev2019042513, 1.14.0.dev2019042601, 1.14.0.dev2019042701, 1.14.0.dev2019042801, 1.14.0.dev2019042901, 1.14.0.dev2019043001, 1.14.0.dev2019050101, 1.14.0.dev2019050201, 1.14.0.dev2019050301, 1.14.0.dev2019050401, 1.14.0.dev2019050501, 1.14.0.dev2019050601, 1.14.0.dev2019050701, 1.14.0.dev2019050801, 1.14.0.dev2019050901, 1.14.0.dev2019051001, 1.14.0.dev2019051101, 1.14.0.dev2019051201, 1.14.0.dev2019051301, 1.14.0.dev2019051401, 1.14.0.dev2019051501, 1.14.0.dev2019051601, 1.14.0.dev2019051701, 1.14.0.dev2019051801, 1.14.0.dev2019051901, 1.14.0.dev2019052001, 1.14.0.dev2019052101, 1.14.0.dev2019052201, 1.14.0.dev2019052301, 1.14.0.dev2019052401, 1.14.0.dev2019052601, 1.14.0.dev2019052901, 1.14.0.dev2019060401, 1.14.0.dev2019060501, 1.14.0.dev2019060601, 1.14.0.dev2019060701, 1.14.0.dev2019060901, 1.14.0.dev2019061001, 1.14.0.dev2019061101, 1.14.0.dev2019061201, 1.14.0.dev2019061301, 1.14.0.dev2019061401, 1.14.0.dev2019061501, 1.14.0.dev2019061601, 1.14.0.dev2019061701, 1.14.0.dev2019061801, 1.14.0.dev2019061901, 1.14.0.dev2019062001, 1.14.0.dev2019062101, 1.14.0.dev2019062201, 1.14.0.dev2019062301, 1.14.0.dev2019062401, 1.14.0.dev2019062501, 1.14.0.dev2019062601, 1.14.0.dev2019062701, 1.14.0.dev2019062801, 1.14.0.dev2019062901, 1.14.0.dev2019063001, 1.14.0.dev2019070101, 1.14.0.dev2019070201, 1.14.0.dev2019070301, 1.14.0.dev2019070401, 1.14.0.dev2019070501, 1.14.0.dev2019070601, 1.14.0.dev2019070701, 1.14.0.dev2019070801, 1.14.0.dev2019070901, 1.14.0.dev2019071001, 1.14.0.dev2019071613, 1.14.0.dev2019071701, 1.14.0.dev2019071801, 1.14.0.dev2019072001, 1.14.0.dev2019072101, 1.14.0.dev2019072201, 1.14.0.dev2019072301, 1.14.0.dev2019072401, 1.14.0.dev2019072501, 1.14.0.dev2019072601, 1.14.0.dev2019072701, 1.14.0.dev2019072801, 1.14.0.dev2019072901, 1.14.0.dev2019073001, 1.14.0.dev2019080218, 1.14.0.dev2019080301, 1.14.0.dev2019080401, 1.14.0.dev2019080501, 1.14.0.dev2019080601, 1.14.0.dev2019080701, 1.14.0.dev2019080801, 1.14.0.dev2019080901, 1.14.0.dev2019081001, 1.14.0.dev2019081101, 1.14.0.dev2019081201, 1.14.0.dev2019081301, 1.14.0.dev2019081401, 1.14.0.dev2019081501, 1.14.0.dev2019081601, 1.14.0.dev2019081701, 1.14.0.dev2019081801, 1.14.0.dev2019081901, 1.14.0.dev2019082001, 1.14.0.dev2019082101, 1.14.0.dev2019082801, 1.14.0.dev2019082901, 1.14.0.dev2019083001, 1.14.0.dev2019083101, 1.14.0.dev2019090101, 1.14.0.dev2019090201, 1.14.0.dev2019090301, 1.14.0.dev2019090401, 1.14.0.dev2019090501, 1.14.0.dev2019090601, 1.14.0.dev2019090701, 1.14.0.dev2019090801, 1.14.0.dev2019090901, 1.14.0.dev2019091001, 1.14.0.dev2019091101, 1.14.0.dev2019091501, 1.14.0.dev2019091601, 1.14.0.dev2019091701, 1.14.0.dev2019091801, 1.14.0.dev2019091901, 1.14.0.dev2019092001, 1.14.0.dev2019092201, 1.14.0.dev2019092301, 2.0.0.dev2019092611, 2.0.0.dev2019092701, 2.0.0.dev2019092801, 2.0.0.dev2019092901, 2.0.0.dev2019093001, 2.0.0.dev2019100101, 2.0.0.dev2019100201, 2.0.0.dev2019100301, 2.0.0.dev2019100401, 2.0.0.dev2019100501, 2.0.0.dev2019100601, 2.0.0.dev2019100701, 2.0.0.dev2019100801, 2.0.0.dev2019100901, 2.0.0.dev2019101001, 2.0.0.dev2019101101, 2.0.0.dev2019101201, 2.0.0.dev2019101301, 2.0.0.dev2019101401, 2.0.0.dev2019101501, 2.0.0.dev2019101601, 2.0.0.dev2019101701, 2.0.0.dev2019101801, 2.0.0.dev2019101901, 2.0.0.dev2019102001, 2.0.0.dev2019102101, 2.0.0.dev2019102201, 2.0.0.dev2019102608, 2.0.0.dev2019102708, 2.0.0.dev2019102808, 2.0.0.dev2019102908, 2.0.0.dev2019103008, 2.0.0.dev2019103108, 2.0.0.dev2019110108, 2.0.0.dev2019110208, 2.0.0.dev2019110308, 2.0.0.dev2019110409, 2.0.0.dev2019110509, 2.0.0.dev2019110609, 2.0.0.dev2019110709, 2.0.0.dev2019110809, 2.0.0.dev2019110909, 2.0.0.dev2019111009, 2.0.0.dev2019111109, 2.0.0.dev2019111209, 2.0.0.dev2019111309, 2.0.0.dev2019111409, 2.0.0.dev2019111509, 2.0.0.dev2019111609, 2.0.0.dev2019111709, 2.0.0.dev2019111809, 2.0.0.dev2019111909, 2.0.0.dev2019112009, 2.0.0.dev2019112109, 2.0.0.dev2019112209, 2.0.0.dev2019112309, 2.0.0.dev2019112409, 2.0.0.dev2019112509, 2.0.0.dev2019112609, 2.0.0.dev2019112709, 2.0.0.dev2019112809, 2.0.0.dev2019112909, 2.0.0.dev2019113009, 2.0.0.dev2019120109, 2.0.0.dev2019120209, 2.0.0.dev2019120309, 2.0.0.dev2019120509, 2.0.0.dev2019120609, 2.0.0.dev2019120709, 2.0.0.dev2019120809, 2.0.0.dev2019120909, 2.0.0.dev2019121009, 2.0.0.dev2019121109, 2.0.0.dev2019121209, 2.0.0.dev2019121309, 2.0.0.dev2019121409, 2.0.0.dev2019121509, 2.0.0.dev2019121609, 2.0.0.dev2019121709, 2.0.0.dev2019121809, 2.0.0.dev2019121909, 2.0.0.dev2019122009, 2.0.0.dev2019122109, 2.0.0.dev2019122209, 2.0.0.dev2019122309, 2.0.0.dev2019122409, 2.0.0.dev2019122509, 2.0.0.dev2019122609, 2.0.0.dev2019122709, 2.0.0.dev2019122809, 2.0.0.dev2019122909, 2.0.0.dev2019123009, 2.0.0.dev2019123109, 2.0.0.dev2020010109, 2.0.0.dev2020010209, 2.0.0.dev2020010309, 2.0.0.dev2020010409, 2.0.0.dev2020010509, 2.0.0.dev2020010609, 2.0.0.dev2020010709, 2.0.0.dev2020010809, 2.0.0.dev2020010909, 2.0.0.dev2020011009, 2.0.0.dev2020011109, 2.0.0.dev2020011209, 2.0.0.dev2020011309, 2.1.0.dev2020011409, 2.1.0.dev2020011509, 2.1.0.dev2020011609, 2.1.0.dev2020011709, 2.1.0.dev2020011809, 2.1.0.dev2020011909, 2.1.0.dev2020012009, 2.1.0.dev2020012109, 2.1.0.dev2020012209, 2.1.0.dev2020012309, 2.1.0.dev2020022102, 2.1.0.dev2020022109, 2.1.0.dev2020022418, 2.1.0.dev2020022509, 2.1.0.dev2020022609, 2.1.0.dev2020022709, 2.1.0.dev2020022809, 2.1.0.dev2020022901, 2.1.0.dev2020030101, 2.1.0.dev2020030201, 2.1.0.dev2020030301)
ERROR: No matching distribution found for tf-estimator-nightly==2.1.0.dev202001230

Note from the Author or Editor:
The latest notebook, available at https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/micro/examples/micro_speech/train/train_micro_speech_model.ipynb, should fix this issue.

HervĂ© Gagnon  Mar 03, 2020  Aug 07, 2020
Printed
Page 290
2nd, 3rd, and 4th paragraphs

A 384 element array of type float is said to be 384 bytes in size multiple times when in fact it should be 1,536 bytes long since each float is 4 bytes long (on a 32-bit machine). If the language were changed to state that the array was 384 elements in size, this would be correct.

Note from the Author or Editor:
Change the text "it has a total size of 384 bytes (128 * 3)" so that it reads "it has a total length of 384 readings (128 * 3)".

Kellen Carey  May 13, 2020  Aug 07, 2020
Printed
Page 292
4th paragraph

The variable name should_continuous_count should instead be continuous_count

Note from the Author or Editor:
In the text that reads "In the next section of PredictGesture(), we use should_continuous_count to...", change the name "should_continuous_count" to "continuous_count".

Kellen Carey  May 13, 2020  Aug 07, 2020
Printed
Page 358
First line

Missing closing parenthesis around '(such as many string functions or sprintf().'

Note from the Author or Editor:
Add closing paren to the sentence

Kellen Carey  May 18, 2020  Aug 07, 2020
Printed
Page 420
2nd paragraph

I believe the numerator and denominator of the division should be reversed, and the result recalculated.

Taking the assumptions in the text, we have 60 million operations to compete, a clock speed of 48 MHz, and the fact that 2 operations can be performed at every clock cycle. Since 2 operations can be performed every clock cycle, we have 60 million operations / 2 operations per clock cycle = 30 million clock cycles. The time taken to complete 30 million clock cycles at 48 MHz (million cycles per second) is 30 million clock cycles / 48 million clock cycles per second = 0.625 seconds. With a chip consuming 2mW, this would work out to 1.25 mJ.

Note from the Author or Editor:
Thanks for the correction in our math! I believe you're right.

The new text should be:

"As an example, if you have a model that takes 60 million operations to execture, like the person detector, and you have a chip like an Arm Cortex-M4 running at 48 MHz, and you believe it can perform two 8-bit multiply/adds per cycle using its DSP extensions, you might guess that the maximum latency would be 30,000,000/48,000,000 = 625 ms. If your chip uses 2 mW, that would work out to 1.25 mJ per inference."

Kellen Carey  May 21, 2020  Aug 07, 2020
Printed
Page 426
Final paragraph

Final sentence contains a grammatical error: 'Obviously your actual results _it_ will depend a lot on ...'

"it" should not be there.

Note from the Author or Editor:
Remove the word "it"

Kellen Carey  May 21, 2020  Aug 07, 2020
Printed
Page 430
3rd paragraph from the bottom

'Unfortunately we know of an easy automatic way to create the list of operations a model uses'

I think ' do not' is missing after 'Unfortunately'.

Note from the Author or Editor:
Change to "Unfortunately we do not know of an easy automatic way"

Kellen Carey  May 21, 2020  Aug 07, 2020
Printed
Page 443
2nd paragraph

There is an extra ')' in the last sentence of the second paragraph.

Note from the Author or Editor:
Remove the extra ')'

Kellen Carey  May 22, 2020  Aug 07, 2020
ePub
Page 2310
top of the page

The current version of the AmbiqSuite is Rel2.2.0 and not Rel2.0.0
Typing the commands verbatim lead to 'file not found errors'

There is a major need to streamline the directory structure to make this usable. It doesn't make sense to type repeatedly all these commands. Note that copy/paste doesn't work from mac kindle app.

Note from the Author or Editor:
Thanks for spotting the problem! You can find updated instructions at https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/micro/examples/hello_world#sign-the-binary

Ali Erdengiz  Apr 21, 2020  Aug 07, 2020