Inside-Deep-Learning
Inside-Deep-Learning copied to clipboard
Chapter 3.4.4 - Dimensions after nn.Flattening-Module
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) ?
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.