Skip to content

Commit

Permalink
docs: removes unnecessary intermediate steps (#1374)
Browse files Browse the repository at this point in the history
  • Loading branch information
grzuy authored Nov 21, 2023
1 parent 7d13411 commit d15aced
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions nx/lib/nx.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12996,10 +12996,8 @@ defmodule Nx do
## Examples
iex> left = Nx.iota({9})
iex> left = Nx.reshape(left, {1, 1, 3, 3})
iex> right = Nx.iota({4})
iex> right = Nx.reshape(right, {4, 1, 1, 1})
iex> left = Nx.iota({1, 1, 3, 3})
iex> right = Nx.iota({4, 1, 1, 1})
iex> Nx.conv(left, right, strides: [1, 1])
#Nx.Tensor<
f32[1][4][3][3]
Expand Down Expand Up @@ -13029,10 +13027,8 @@ defmodule Nx do
]
>
iex> left = Nx.iota({9})
iex> left = Nx.reshape(left, {1, 1, 3, 3})
iex> right = Nx.iota({8})
iex> right = Nx.reshape(right, {4, 1, 2, 1})
iex> left = Nx.iota({1, 1, 3, 3})
iex> right = Nx.iota({4, 1, 2, 1})
iex> Nx.conv(left, right, strides: 2, padding: :same, kernel_dilation: [2, 1])
#Nx.Tensor<
f32[1][4][2][2]
Expand Down Expand Up @@ -13379,8 +13375,7 @@ defmodule Nx do
A more complex example:
iex> t = Nx.iota({900})
iex> t = Nx.reshape(t, {2, 15, 30})
iex> t = Nx.iota({2, 15, 30})
iex> Nx.slice(t, [0, 4, 11], [2, 3, 9], strides: [2, 1, 3])
#Nx.Tensor<
s64[1][3][3]
Expand Down

0 comments on commit d15aced

Please sign in to comment.