fix typos

This commit is contained in:
yuebanyishenqiu 2020-03-22 09:41:29 +08:00
parent 1605a01039
commit 1511778267
1 changed files with 3 additions and 3 deletions

View File

@ -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