Commit 533e949
Expand migration guide with comprehensive Context API training documentation
Added extensive training documentation to migration_guide.md:
- Updated Basic Training Step with Context API examples
- Added comprehensive "Training with the Context API" section with patterns:
* Dynamic learning rate with per-step data updates
* Batched training with symbolic indexing
* Inference after training
- Side-by-side PyTorch comparisons for all examples
- New "Demystifying Train" section showing Train module internals:
* Compared grad_update and sgd_update implementations with PyTorch
* Demonstrated compilation vs eager execution differences
* Examples of custom optimizers (Adam) and training patterns
* Emphasized Train as a transparent recipe book, not black magic
Also removed non-existent Train.sgd_step function that was incorrectly
introduced during refactoring - compilation should happen once outside loops.
Fixed learning_rate parameter to be a tensor (not float) in all examples,
and corrected data advancement in training loops.
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 87ac57e commit 533e949
2 files changed
+411
-15
lines changed
0 commit comments