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
#1
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
#2
Docker has changed their website around and the URL on page 244 (A.1.3) which is listed as https://www.docker.com/products/docker-toolbox seems to redirect to https://www.docker.com/get-docker and instead of Docker Toolbox, it appears I need to install Docker Community Edition instead.
530123 (4) [Avatar] Offline
#3
Listing 2.6:

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

This is inconsistent. Both lines should use neg_op or negMatrix.
530123 (4) [Avatar] Offline
#4
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 = saver.save(sess, "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 = saver.save(sess, "./spikes.ckpt")

to eliminate an error about non-existent parent directory.
john.watson@gmail.com (10) [Avatar] Offline
#5
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 = sess.run(negMatrix)

This is inconsistent. Both lines should use neg_op or negMatrix.
ccrittrs (1) [Avatar] Offline
#6
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
#7
Typo in Sect. 4.3 on p152 I think: "Are you've seen, ..."
326089 (1) [Avatar] Offline
#8
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
#9
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
#10
Listing 2.16

sess.add_graph(sess.graph)


should be

writer.add_graph(sess.graph)

368293 (1) [Avatar] Offline
#11
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
#12
In Chap 5:

Listing 5.3

With python2.7 in a virtualenv, I had to edit the Bregman code in site-packages/bregman/features_base.py, 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
#13
Listing 2.13, missing closing parenthesis:

curr_avg = sess.run(update_avg, feed_dict={curr_value:raw_data[i]}


Should be:

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

https://forums.manning.com/posts/list/43023.page#p123278

Hope it helps!

633056 (4) [Avatar] Offline
#15
4.2.2 definitions and exercise 4.2 are out of sync.
Exercise 4.2 mixed up precision and recall.
633056 (4) [Avatar] Offline
#16
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.