Skip to content

Commit bbf8f89

Browse files
bors[bot]darsnack
andauthored
Merge #1831
1831: Remove "Batches" from one hot section header in docs r=darsnack a=darsnack Closes #510. ### PR Checklist - [x] ~~Tests are added~~ - [x] ~~Entry in NEWS.md~~ - [x] Documentation, if applicable - [x] ~~API changes require approval from a committer (different from the author, if applicable)~~ Co-authored-by: Kyle Daruwalla <daruwalla@wisc.edu>
2 parents 75e3771 + 6ec825c commit bbf8f89

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

docs/src/data/onehot.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,7 @@ julia> onecold([0.3, 0.2, 0.5], [:a, :b, :c])
3131
:c
3232
```
3333

34-
```@docs
35-
Flux.onehot
36-
Flux.onecold
37-
```
38-
39-
## Batches
40-
41-
`onehotbatch` creates a batch (matrix) of one-hot vectors, and `onecold` treats matrices as batches.
34+
For multiple samples at once, `onehotbatch` creates a batch (matrix) of one-hot vectors, and `onecold` treats matrices as batches.
4235

4336
```jldoctest onehot
4437
julia> using Flux: onehotbatch
@@ -59,5 +52,7 @@ julia> onecold(ans, [:a, :b, :c])
5952
Note that these operations returned `OneHotVector` and `OneHotMatrix` rather than `Array`s. `OneHotVector`s behave like normal vectors but avoid any unnecessary cost compared to using an integer index directly. For example, multiplying a matrix with a one-hot vector simply slices out the relevant row of the matrix under the hood.
6053

6154
```@docs
55+
Flux.onehot
56+
Flux.onecold
6257
Flux.onehotbatch
6358
```

0 commit comments

Comments
 (0)