Skip to content

Commit 66bfa20

Browse files
committed
fix doctest comment
1 parent bc0fd15 commit 66bfa20

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/data/dataloader.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ julia> for x in tuple_loader
4949
@assert size(x[1]) == (10, 2)
5050
end
5151
52-
julia> Ytrain = rand('a':'z', 100); # now make a DataLoader returning 2-element named tuples
52+
julia> Ytrain = rand('a':'z', 100); # now make a DataLoader yielding 2-element named tuples
5353
5454
julia> train_loader = Flux.DataLoader((data=Xtrain, label=Ytrain), batchsize=5, shuffle=true);
5555
@@ -70,10 +70,10 @@ true
7070
julia> first(train_loader).label == Ytrain[1:5] # because of shuffle=true
7171
false
7272
73-
julia> foreach(println∘size, Flux.DataLoader(rand(10, 64), batchsize=30))
73+
julia> foreach(println∘size, Flux.DataLoader(rand(10, 64), batchsize=30)) # partial=false would omit last
7474
(10, 30)
7575
(10, 30)
76-
(10, 4) # partial=false would omit this
76+
(10, 4)
7777
```
7878
"""
7979
function DataLoader(data; batchsize=1, shuffle=false, partial=true, rng=GLOBAL_RNG)

0 commit comments

Comments
 (0)