Repository navigation
Show reverse-mode adjoints in the neural network tutorial - #693
Merged
Merged
Conversation
utkuyilmaz1903
marked this pull request as ready for review
September 12, 2026 10:16
ChrisRackauckas
added a commit
that referenced
this pull request
Sep 13, 2026
- Show reverse-mode adjoints in the neural network tutorial (#693) - Hoist the row range out of the ntuple closure in spectral_array_derivative (#694) Agent-Harness: Claude Code Agent-Model: claude-opus-5[1m] Claude-Session: https://claude.ai/code/session_014FEzNTLFutCmTEAZ3zBg5R Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The first neural network tutorial said reverse-mode adjoints through the PDE solution interface are not supported. Since SciMLSensitivity 7.119.6 (SciML/SciMLSensitivity.jl#1640, SciML/SciMLSensitivity.jl#1641) they work, so the sentence goes and a short section at the end shows the two changes the loss needs (
wrap = Val(false)and the data as an array) with an adjoint gradient checked against ForwardDiff. The section also says what the measurement says: on this problem the adjoint is two orders of magnitude slower than ForwardDiff, and it pays off only for much larger networks.The 2D Brusselator page plots every fifth point in its scatter; the full set made a 4.4 MB SVG.
SciMLSensitivity and ForwardDiff join the docs dependencies.