mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-05-08 02:28:25 -05:00
[GH-ISSUE #1226] Possibly wrong computation of total number of weights? #5699
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @paolo-estavillo on GitHub (Mar 11, 2026).
Original GitHub issue: https://github.com/harvard-edge/cs249r_book/issues/1226
In the book chapter named "DL Primer", a paragraph in the "Summary" section says the following:
My concern is the following sentence here:
61,400 is clearly not (784 × 100). If we consider the bias parameter per neuron, shouldn't this be (784 inputs × 100 neurons + 100 bias params = 78500 params)?
Is this a valid concern? Or did I miss something? How did we came up with 61,400 weights?
@profvjreddi commented on GitHub (Mar 11, 2026):
Good catch. This is indeed an error. The arithmetic is straightforward, and I'm pretty sure I know exactly when this snuck in. I was streamlining all the networks to ensure consistency throughout the book, and this was one of those stragglers that didn't get updated with everything else. In the latest version I'll be releasing soon, I've updated everything to ensure there's a single source of truth and that values are always calculated, so these kinds of errors don't happen. Nonetheless, thank you!
Weights only: 784 × 100 = 78,400 weights
Total parameters (weights + biases): 784 × 100 + 100 = 78,500 parameters
All other instances in the chapter already use the correct value. This has been fixed in commit
7c30232, and the live site will be updated shortly.@all-contributors please add @paolo-estavillo as a contributor for ✍️ Doc in Book
@github-actions[bot] commented on GitHub (Mar 11, 2026):
I've added @paolo-estavillo as a contributor to book! 🎉
Recognized for: doc
Project(s): book (explicitly mentioned in comment)
Based on: @all-contributors please add @paolo-estavillo as a contributor for ✍️ Doc in Book
The contributor list has been updated in:
book/.all-contributorsrc,book/README.mdREADME.mdWe love recognizing our contributors! ❤️