Commit 0f14cd3
Fix Sophia optimizer: add Random import to resolve randn! error
The Sophia optimizer calls randn!() on line 155 of src/sophia.jl but
Random was not imported. This caused UndefVarError when using Sophia.
Changes:
- Add Random to dependencies in Project.toml
- Import Random in src/Optimization.jl
Fixes #1004
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 4f072a7 commit 0f14cd3
2 files changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
0 commit comments