rasbt / machine-learning-book

Code Repository for Machine Learning with PyTorch and Scikit-Learn
https://sebastianraschka.com/books/#machine-learning-with-pytorch-and-scikit-learn
MIT License
3.64k stars 1.31k forks source link

P. 458 bracket should be corrected to floor oepration #72

Closed hongsoog closed 2 years ago

hongsoog commented 2 years ago

In Page 458,

In the following paragraph at the bottom of page,

Consider the following two cases:

$$ n=10, m=5, p=2, s=1 \to o = \left [ \frac{10 + 2 \times 2 - 5}{1} \right ] +1 = 10 $$

(Note that in this case, the output size turns out to be the same as the input; therefore, we can conclude this to be same padding mode.)

$$ n=10, m=3, p=2, s=2 \to o = \left [ \frac{10 + 2 \times 2 - 3}{2} \right ] +1 = 6 $$

should be corrected right floor symbole as follows: Consider the following two cases:

$$ n=10, m=5, p=2, s=1 \to o = \left \lfloor \frac{10 + 2 \times 2 - 5}{1} \right \rfloor +1 = 10 $$

(Note that in this case, the output size turns out to be the same as the input; therefore, we can conclude this to be same padding mode.)

$$ n=10, m=3, p=2, s=2 \to o = \left \lfloor \frac{10 + 2 \times 2 - 3}{2} \right \rfloor +1 = 6 $$

rasbt commented 2 years ago

Oh yes, 100%. This looks correct in my drafts. I think what happened was that the layouter thought the top part was cut off and replaced the floor symbol by regular brackets 😅. Thanks for sending that in!

Edit: Added it to the errata