Skip to content

Conversation

AbelHo
Copy link

@AbelHo AbelHo commented Sep 13, 2025

typo correction
grad4.inner.θ3 -> grad4[2].inner.θ3

at

julia> grad4 = gradient(|>, 5, poly4)
(1.0, (outer = (θ3 = [1.0, 17.5, 306.25],), inner = (θ3 = [0.5, 2.5, 12.5],)))

Here grad4.inner.θ3 corresponds to poly4.inner.θ3. These matching nested structures are at the core of how Flux works.

@Copilot Copilot AI review requested due to automatic review settings September 13, 2025 01:46
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a typo in the documentation where the gradient access syntax was incorrect. The change corrects the reference to show the proper indexing into the gradient tuple structure.

  • Corrects gradient access syntax from grad4.inner.θ3 to grad4[2].inner.θ3

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant