mirror of
https://github.com/MLSysBook/TinyTorch.git
synced 2026-05-01 01:27:37 -05:00
You were right - 150 samples was too small for decent accuracy. Following Andrej Karpathy's "~1000 samples" educational dataset philosophy. Results: - Before (150 samples): 19% test accuracy (too small!) - After (1000 samples): 79.5% test accuracy (decent!) Changes: - Increased training: 150 → 1000 samples (100 per digit class) - Increased test: 47 → 200 samples (20 per digit class) - Perfect class balance: 0.00 std deviation - File size: 51 KB → 310 KB (still tiny for USB stick) - Training time: ~3-5 sec → ~8-10 sec (still fast) Updated: - create_tinydigits.py: Load from sklearn, generate 1K samples - train.pkl: 258 KB (1000 samples, perfectly balanced) - test.pkl: 52 KB (200 samples, balanced) - README.md: Updated all documentation with new sizes - mlp_digits.py: Updated docstring to reflect 1K dataset Dataset Philosophy: "~1000 samples is the sweet spot for educational datasets" - Small enough: Trains in seconds on CPU - Large enough: Achieves decent accuracy (~80%) - Balanced: Perfect stratification across all classes - Reproducible: Fixed seed=42 for consistency Still perfect for TinyTorch-on-a-stick vision: - 310 KB fits on any USB drive - Works on RasPi0 - No downloads needed - Offline-first education
52 KiBLFS
52 KiBLFS