1096: fix doc typos r=dhairyagandhi96 a=wenjie-p



Co-authored-by: yuebanyishenqiu <thisispwj@outlook.com>
This commit is contained in:
bors[bot] 2020-03-22 06:26:11 +00:00 committed by GitHub
commit 240ab1147f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,7 +30,7 @@ Example usage:
Xtrain = rand(10, 100) Xtrain = rand(10, 100)
train_loader = DataLoader(Xtrain, batchsize=2) train_loader = DataLoader(Xtrain, batchsize=2)
# iterate over 50 mini-batches of size 2 # iterate over 50 mini-batches of size 2
for x in train_loader: for x in train_loader
@assert size(x) == (10, 2) @assert size(x) == (10, 2)
... ...
end end
@ -41,7 +41,7 @@ Example usage:
Ytrain = rand(100) Ytrain = rand(100)
train_loader = DataLoader(Xtrain, Ytrain, batchsize=2, shuffle=true) train_loader = DataLoader(Xtrain, Ytrain, batchsize=2, shuffle=true)
for epoch in 1:100 for epoch in 1:100
for (x, y) in train_loader: for (x, y) in train_loader
@assert size(x) == (10, 2) @assert size(x) == (10, 2)
@assert size(y) == (2,) @assert size(y) == (2,)
... ...
@ -89,4 +89,4 @@ end
function Base.length(d::DataLoader) function Base.length(d::DataLoader)
n = d.nobs / d.batchsize n = d.nobs / d.batchsize
d.partial ? ceil(Int,n) : floor(Int,n) d.partial ? ceil(Int,n) : floor(Int,n)
end end