The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

Susan Harkins (424) [Avatar] Offline
Please post errors found in the published version of Machine Learning with TensorFlow here. If necessary, we'll publish a comprehensive list for everyone's convenience. Thank you!

Susan Harkins
Errata Editor
Manning Publications
116964 (1) [Avatar] Offline
Docker has changed their website around and the URL on page 244 (A.1.3) which is listed as seems to redirect to and instead of Docker Toolbox, it appears I need to install Docker Community Edition instead.
530123 (4) [Avatar] Offline
Listing 2.6:

Line 3: neg_op = tf.negative(x)
Line 5: result =

This is inconsistent. Both lines should use neg_op or negMatrix.
530123 (4) [Avatar] Offline
Listing 2.10 on page 43 (pdf), on macOS 10.13.3, Python 3.6.4, TensorFlow 1.5.0:

The following code runs but will result in a subsequent error:
saver = tf.train.Saver() 

The error will occur in:
save_path =, "spikes.ckpt")

In order to get it to run properly I used the following:
saver = tf.train.Saver([spikes])

Note I also had to use:
save_path =, "./spikes.ckpt")

to eliminate an error about non-existent parent directory. (10) [Avatar] Offline
I saw this error as well. The negMatrix var is defined in the previous listing. It is called neg_op in listing 2.6

530123 wrote:Listing 2.6:

Line 3: neg_op = tf.negative(x)
Line 5: result =

This is inconsistent. Both lines should use neg_op or negMatrix.
ccrittrs (1) [Avatar] Offline
A minor error, but Table 1.1 on page 23 says that K-means clustering and self-organizing maps are chapter 6 and hidden Markov models are chapter 5, but this is the reverse of the actual chapters they are in.
206159 (3) [Avatar] Offline
Typo in Sect. 4.3 on p152 I think: "Are you've seen, ..."
326089 (1) [Avatar] Offline
Page 47 in the paperback, listing 2.16. The optional line sess.add_graph(sess.graph) should be writer.add_graph(sess.graph)
544462 (1) [Avatar] Offline
In chapter 7 - Autoencoders

Listing 7.11 it is given

if len(data) > 0:
data = np.vstack((data, batch_data['data']))
labels = np.hstack((labels, batch_data['labels']))

And as comment-

Labels are one dimensional, so you stack them horizontally

However in the GitHub this is

if len(data) > 0:

data = np.vstack((data, batch_data['data']))

labels = np.vstack((labels, batch_data['labels']))

See how the labels became np.vstack

And the GitHub seems to be correct, as the first version doesn't converge .
Amnon David (10) [Avatar] Offline
Listing 2.16


should be


368293 (1) [Avatar] Offline
RNN example SeriesPredictor in section 10.3. on page 195 of the paperback.

The results I'm seeing are *close* to the predicted values in the book which are given as 4, 9, 11, 13 but not exactly.

I've been over the code and believe I have everything correct. Does the author mean the predicted result will be close to those values or those values exactly? Could this be rechecked?
206159 (3) [Avatar] Offline
In Chap 5:

Listing 5.3

With python2.7 in a virtualenv, I had to edit the Bregman code in site-packages/bregman/, replacing references to self._cqtN with int(self._cqtN). Otherwise get_dataset() fails with an error trying to use a non-integer as an index.
aishaolang (6) [Avatar] Offline
Listing 2.13, missing closing parenthesis:

curr_avg =, feed_dict={curr_value:raw_data[i]}

Should be:

curr_avg =, feed_dict={curr_value:raw_data[i]})
581905 (2) [Avatar] Offline
Concerning Listing 2.16 with placeholder and session problems, please consider the following post that has a possible solution:

Hope it helps!

633056 (4) [Avatar] Offline
4.2.2 definitions and exercise 4.2 are out of sync.
Exercise 4.2 mixed up precision and recall.
633056 (4) [Avatar] Offline
Listing 4.7 cost function includes the entire formula in the tf.log function.
If not a mistake, it isn't explained why this formula is correct.