Merge #1096
1096: fix doc typos r=dhairyagandhi96 a=wenjie-p Co-authored-by: yuebanyishenqiu <thisispwj@outlook.com>
This commit is contained in:
commit
240ab1147f
|
@ -30,7 +30,7 @@ Example usage:
|
|||
Xtrain = rand(10, 100)
|
||||
train_loader = DataLoader(Xtrain, batchsize=2)
|
||||
# iterate over 50 mini-batches of size 2
|
||||
for x in train_loader:
|
||||
for x in train_loader
|
||||
@assert size(x) == (10, 2)
|
||||
...
|
||||
end
|
||||
|
@ -41,7 +41,7 @@ Example usage:
|
|||
Ytrain = rand(100)
|
||||
train_loader = DataLoader(Xtrain, Ytrain, batchsize=2, shuffle=true)
|
||||
for epoch in 1:100
|
||||
for (x, y) in train_loader:
|
||||
for (x, y) in train_loader
|
||||
@assert size(x) == (10, 2)
|
||||
@assert size(y) == (2,)
|
||||
...
|
||||
|
@ -89,4 +89,4 @@ end
|
|||
function Base.length(d::DataLoader)
|
||||
n = d.nobs / d.batchsize
|
||||
d.partial ? ceil(Int,n) : floor(Int,n)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue