chiphuyen / dmls-book

Summaries and resources for Designing Machine Learning Systems book (Chip Huyen, O'Reilly 2022)
https://www.amazon.com/Designing-Machine-Learning-Systems-Production-Ready/dp/1098107969
2.26k stars 331 forks source link

Graph on page 219 has kernel sizes wrong. #3

Open uzair789 opened 1 year ago

uzair789 commented 1 year ago

Hi Chip and team, thank you for the excellent book on ML systems design. I was going through the book and found that there is a mistake (typo) in the Graph optimization figure on page 219. The original graph, and the optimized graphs have different kernel sizes which is incorrect. I checked the cited reference link here at nvidia and indeed the original graph has a mistake on the kernel sizes. Two of the 3x3 kernels taking input from the input node must be 1x1 and two of the three 3x3 kernels in the next layer must be 5x5 and 1x1. Because this is an optimization, I thought the kernel sizes are also being optimized but after thinking about it for a while, I figured the weight dimensions will change and the trained weights will not work if that is the case.

Just wanted to make a note here in case somebody else also notices this and also if you would like to fix it in the future editions. Thank you for the amazing work once again.

uzair789 commented 1 year ago

A small typo on page 218 as well in the code block. In the optimized code, A[i, i] should actually be A[i, 1]. Just adding here as a comment to make a note as this is trivial.