Files
TinyTorch/tinytorch/nn
Vijay Janapa Reddi 1ef17210b9 refactor: Keep explicit module imports + optimize CNN milestone
Import Strategy:
- Keep explicit 'from tinytorch.core.spatial import Conv2d'
- Maps directly to module structure (Module 09 → core.spatial)
- Better for education: students see exactly where each concept lives
- Removed redundant tinytorch/nn.py (nn/ directory already exists)

Milestone 04 Optimizations:
- Reduced epochs: 50 → 20 (explicit loops are slow!)
- Print progress every 5 epochs (instead of 10)
- Load from local npz file (no sklearn dependency)
- Still achieves ~80%+ accuracy

Educational Rationale:
TinyTorch uses explicit imports to show module structure:
  tinytorch.core.tensor      # Module 01
  tinytorch.core.layers      # Module 03
  tinytorch.core.spatial     # Module 09
  tinytorch.core.losses      # Module 04

PyTorch's torch.nn is convenient but pedagogically unclear.
Our approach: clarity over convenience!
2025-09-30 17:15:40 -04:00
..