Skip to content

Commit 3967746

Browse files
fix cpu(dataloader) (#2587)
1 parent 009d984 commit 3967746

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/functor.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ julia> Flux.DataLoader((x = ones(2,10), y=2:11) |> gpu, batchsize=3)
226226
it will not work on (say) a tuple of `DataLoader`s.
227227
"""
228228
function gpu(d::MLUtils.DataLoader)
229-
MLUtils.DataLoader(MLUtils.mapobs(gpu, d.data),
229+
MLUtils.DataLoader(MLUtils.mapobs(gpu, d.data);
230230
d.batchsize,
231231
d.buffer,
232232
d.partial,
@@ -238,7 +238,7 @@ function gpu(d::MLUtils.DataLoader)
238238
end
239239

240240
function cpu(d::MLUtils.DataLoader)
241-
MLUtils.DataLoader(MLUtils.mapobs(cpu, d.data),
241+
MLUtils.DataLoader(MLUtils.mapobs(cpu, d.data);
242242
d.batchsize,
243243
d.buffer,
244244
d.partial,

0 commit comments

Comments
 (0)