Inside-Deep-Learning icon indicating copy to clipboard operation
Inside-Deep-Learning copied to clipboard

Chapter 3.4.4 - Dimensions after nn.Flattening-Module

Open benjwolff opened this issue 2 years ago • 1 comments

In Chapter 3.4.4 the code is shown for creating a first CNN. For using nn.Flattening before the last Layer, it says in the code comments (in the book it's point 10), "Converts from (B, C, W, H) ->(B, D) so we can use a Linear layer". Shouldn't it actually be (B, filters, C, W, H) -> (B, filters*D) ?

benjwolff avatar Jul 21 '23 10:07 benjwolff

Yea, I wrote that ambiguously. The idea behind the comment was that the C*W*H becomes your new "dimensions" D. But then I used D as a variable for the number of pixels.

EdwardRaff avatar Jul 21 '23 14:07 EdwardRaff