mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-05-08 02:28:25 -05:00
[PR #1630] fix(labs): correct FLOP scaling answer key in lab 05 Part C #9236
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?
📋 Pull Request Information
Original PR: https://github.com/harvard-edge/cs249r_book/pull/1630
Author: @Shashank-Tripathi-07
Created: 5/3/2026
Status: 🔄 Open
Base:
dev← Head:fix/lab05-flop-scaling-answer📝 Commits (2)
05f6d8ffix(labs): correct FLOP scaling answer key in lab 05 Part C1d14fd9fix(labs): correct FLOPs scaling description in lab 05 learning objectives📊 Changes
1 file changed (+11 additions, -8 deletions)
View changed files
📝
labs/vol1/lab_05_nn_compute.py(+11 -8)📄 Description
Summary
Part C asks: "A 3-layer MLP has hidden layers of width 128. You double hidden width to 256. By how much do total FLOPs increase?"
The answer key marked "C) ~4x (quadratic)" as correct, but the code itself computes:
The 4x scaling only applies to the hidden-to-hidden layer (2W^2). The input layer (2784W) and output layer (2W*10) scale linearly, pulling the total to ~2.3x. The correct answer is "A) 2x".
The "Correct" callout itself was already printing
~{_actual_256:.1f}x=~2.3xwhile saying "Correct" for 4x -- a visible contradiction. The MathPeek also said "(not 2x!)" when it should say "(not 4x!)".Changes
"4x"→"2x"(not 2x!)→(not 4x!)Test plan
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.