deep-learning-with-pytorch / dlwpt-code

Code for the book Deep Learning with PyTorch by Eli Stevens, Luca Antiga, and Thomas Viehmann.
https://www.manning.com/books/deep-learning-with-pytorch
4.69k stars 1.99k forks source link

Typos in Chapter 15 (mostly) #38

Open t-vi opened 3 years ago

t-vi commented 3 years ago

The inimitable @stas00 looked at Chapter 15 and found some errors/unclear parts. I'm collecting them here while I work on getting them into the errata. Thank you, Stas! Any remaining bad bits are mine, of course.

p466:

doesn't make it clear that code has been removed, which makes it hard to understand where those variables in the subsequent lines suddenly appeared. I'd write it as:

[...] // here we need to produce an output tensor from input

i.e. it's not clear that ... merged with the comment is there to indicate that some code was snipped.

e.g. on page 471 it's loud and clear that code has been removed.

and later

p469:

it's not clear what "the file" is

p470:

"In contrast to what we did (and should!) in Python"

I can see you're alluding to __call__ but it's not obvious.

First I thought it'd be better to say:

"In contrast to what we did (and should not!) in Python"

but it's still ambiguous, might be easier to say it in direct language.

"As explained in earlier chapters in Python we don't normally call forward explicitly, but in C++ we do."

or something like that.

p475:

"Another approach to is to reduce the footprint of each parameter and operation:"

typo: first "to" shouldn't be there.

p476:

"convolutions and linear layers as weighted averages, we may expect rounding errors to typically cancel.19"

I think the correct expression is "to cancel out"

same goes for the footnote:

", leading to errors adding up rather than canceling."

==============

and earlier:

p87:

The capture:

"Figure 4.5 Transforming a 1D, multichannel dataset into a 2D, multichannel dataset by separating the date and hour of each sample into separate axes"

doesn't match the previous text:

"Our goal will be to take a flat, 2D dataset and transform it into a 3D one, as shown in figure 4.5."

The capture most likely needs to say "2D to 3D"