Skip to content

Commit

Permalink
docs: fixes invalid syntax in Nx.Defn.grad/2 docs (#1369)
Browse files Browse the repository at this point in the history
  • Loading branch information
grzuy authored Nov 14, 2023
1 parent 49d2467 commit 9c97dbe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nx/lib/nx/defn.ex
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ defmodule Nx.Defn do
## Examples
defn tanh_grad(t) do
grad(t, &Nx.tanh/&1)
grad(t, &Nx.tanh/1)
end
To differentiate on multiple vars, pass a tuple as first argument:
Expand Down Expand Up @@ -658,7 +658,7 @@ defmodule Nx.Defn do
## Examples
defn tanh_grad(t) do
value_and_grad(t, &Nx.tanh/&1)
value_and_grad(t, &Nx.tanh/1)
end
To differentiate on multiple vars, pass a tuple as first argument:
Expand Down

0 comments on commit 9c97dbe

Please sign in to comment.