mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-07-16 14:42:29 -05:00
[GH-ISSUE #1614] [Bug] Milestone 3 does not get past 75% test accuracy over xor problem #29747
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 @AndreaMattiaGaravagno on GitHub (Apr 30, 2026).
Original GitHub issue: https://github.com/harvard-edge/cs249r_book/issues/1614
Area
TinyTorch
Location
Milestone 3
Description
Milestone 3 does not get past 75% test accuracy over xor problem
Expected Behavior
Milestone 3 should get 100% test accuracy over the xor problem
Environment (TinyTorch bugs only)
Tiny🔥Torch v0.1.10
Python 3.12.3
/home/andre/tinytorch/.venv
@profvjreddi commented on GitHub (Apr 30, 2026):
Fixed in #1618 (merged to dev as
f1d5a755f). Regression traced to commitd30257577cwhich migratednp.random.seed(1986)(global, affecting layer init) to a localrng = np.random.default_rng(7)that's never used — so layer weights ended up usingtinytorch.core.layers.rngat the default seed=7, which on this XOR architecture lands in a dead-ReLU saddle (the 75% failure mode). Fix: explicitly re-seedtinytorch.core.layers.rngto 1986 right before model construction in02_xor_solved.py. Verified 100% convergence (loss 0.0053 in 500 epochs).