Errata

TensorFlow for Deep Learning

Errata for TensorFlow for Deep Learning

Submit your own errata for this product.

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
ePub Page Chapter 3
Example 3-3

x_zeros = np.random.multivariate_normal(
mean=np.array((-1, -1)), cov=.1*np.eye(2), size=(N/2,))

will throw an error as N/2 is a float and numpy wants an int. Switching to N//2 solves this for all 4 assignments:

# Generate synthetic data
N = 100
# Zeros form a Gaussian centered at (-1, -1)
x_zeros = np.random.multivariate_normal(
mean=np.array((-1, -1)), cov=.1*np.eye(2), size=(N//2,))
y_zeros = np.zeros((N//2,))
# Ones form a Gaussian centered at (1, 1)
x_ones = np.random.multivariate_normal(
mean=np.array((1, 1)), cov=.1*np.eye(2), size=(N//2,))
y_ones = np.ones((N//2,))

Robert Slater  Mar 30, 2018 
Example 2-15
Example 2-15

>>> a = tf.ones((2,2), dtype=tf.int32)
>>> a.eval()
array([[0, 0],
[0, 0]], dtype=int32)

the output should be a tensor of ones

João Marcos Gris  Mar 30, 2018 
chapter 4, third paragraph after Figure 4-2

where sigma is a matrix in ℝn×m and the nonlinearity σ is applied componentwise.

should be

where w is a matrix in ℝn×m and the nonlinearity σ is applied componentwise.

Anonymous  Apr 27, 2018 
example 3-3

x_zeros = np.random.multivariate_normal(
mean=np.array((-1, -1)), cov=.1*np.eye(2), size=(N/2,))

has to N//2 in the entire example, N/2 gives the error

TypeError: 'float' object cannot be interpreted as an integer

Sidharth Kashyap  Sep 22, 2018 
Printed Page 24
Last mathematical statement

The (2,1) element of the intermediary matrix (before simplification) should be:
"sin(alpha) * 1 + cos(alpha) * 0" not "sin(alpha) * 1 - cos(alpha) * 0".

Anonymous  Mar 25, 2018 
Printed Page 35
Example 2-15

The output of a.eval() and b.eval() should reflect a matrix of ones, instead of zeros; or tf.ones() should be changed to tf.zeros()

Dave DeBarr  Apr 13, 2018 
Printed Page 35
Example 2-15

As of TensorFlow r1.14 (June 25, 2019), tf.float() is deprecated. The line "b = tf.to_float(a)" should instead read "b = tf.cast(a, float)".

Note that there is an existing/unconfirmed errata for this same example which I agree with, for what it's worth: "tf.ones()" should result in a matrix filled with ones rather than zeroes.

Michael Blankenship  Jun 25, 2019 
Printed Page 217
middle

Following code section is repeated.

# Read a record, getting filenames from the filename_queue. No
...
record_bytes = tf.decode_raw(value, tf.uint8)

Anonymous  May 13, 2018 
PDF, ePub Page 227
3rd full paragraph

Edition updated on March 2nd, 2018.

Page 227 in the PDF. Page 251 in the ePub.

Second paragraph under "Deep Learning in Law"

"neurolinguistic processing (NLP)" should be "natural language processing (NLP)".

Anonymous  Mar 03, 2018