Skip to content

Comments

docs: autodiff docs#1580

Merged
polvalente merged 5 commits intomainfrom
pv-docs/autodiff
Mar 5, 2025
Merged

docs: autodiff docs#1580
polvalente merged 5 commits intomainfrom
pv-docs/autodiff

Conversation

@polvalente
Copy link
Contributor

Adds a guide on automatic differentiation

@polvalente polvalente self-assigned this Feb 11, 2025
])
```

## What is Function Differentiation?
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: let's make sure we are consistent with titles and if we use "What is function differentiation?" or "What is Function Differentiation?". FWIW, in the Elixir repo itself, we use the former, but we can follow another convention here.


## What is Function Differentiation?

Nx, through the `Nx.Defn.grad/2` and `Nx.Defn.value_and_grad/3` functions allows the user to differentiate functions that were defined through `defn`.
Copy link
Contributor

Choose a reason for hiding this comment

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

For what is worth, we don't explain in this section what is function differentiation. We do talk about differentiation, gradient and derivative, but we don't explain any of the terms. It may be valuable to give a step back and provide a high-level overview. And then either reduce the amount of terms or explicitly explain them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added 2 paragraphs explaining derivatives and gradients

Copy link
Contributor

@josevalim josevalim left a comment

Choose a reason for hiding this comment

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

Just some nits and ship it :)

@polvalente polvalente merged commit 9ab4a26 into main Mar 5, 2025
8 checks passed
@polvalente polvalente deleted the pv-docs/autodiff branch March 5, 2025 17:47
TomasPegado pushed a commit to TomasPegado/nx that referenced this pull request Mar 31, 2025
TomasPegado pushed a commit to TomasPegado/nx that referenced this pull request Apr 1, 2025
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.

2 participants