Commit 94e449c
Fix Sophia neural network training documentation example
Addresses issue #937 by updating the tutorial to properly use DataLoader with minibatching.
Changes made:
- Keep DataLoader as the third parameter to OptimizationProblem
- Ensure loss function properly unpacks batch data as (x_batch, y_batch)
- Add epochs parameter to solve() to iterate over the DataLoader properly
- Fix callback string interpolation to use $(state.iter) instead of %5d format
This follows the correct Optimization.jl minibatching pattern as used in the minibatch tutorial.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent c5648ec commit 94e449c
1 file changed
+5
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
91 | | - | |
| 92 | + | |
92 | 93 | | |
0 commit comments