Skip to content

Commit 0a1ad37

Browse files
bors[bot]eliascarv
andauthored
Merge #1783
1783: Doc update (training.md): fix DataLoader example in Training section r=ToucheSir a=eliascarv Change from: ```julia X = rand(28, 28, 60000) Y = rand(0:9, 60000) data = DataLoader(X, Y, batchsize=128) ``` To: ```julia X = rand(28, 28, 60000) Y = rand(0:9, 60000) data = DataLoader((X, Y), batchsize=128) ``` Co-authored-by: eliascarv <73039601+eliascarv@users.noreply.github.com>
2 parents ed99b5b + f06bcc9 commit 0a1ad37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/src/training/training.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ Training data can be conveniently partitioned for mini-batch training using the
102102
```julia
103103
X = rand(28, 28, 60000)
104104
Y = rand(0:9, 60000)
105-
data = DataLoader(X, Y, batchsize=128)
105+
data = DataLoader((X, Y), batchsize=128)
106106
```
107107

108108
Note that, by default, `train!` only loops over the data once (a single "epoch").

0 commit comments

Comments
 (0)