Skip to content

Commit f3b22f1

Browse files
Update flux_mnist.jl
1 parent 72f24e4 commit f3b22f1

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

examples/flux_mnist.jl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@ function mnist_transform(batch)
1414
return (; image, label)
1515
end
1616

17-
# Remove when https://github.com/JuliaML/MLUtils.jl/pull/147 is merged and tagged
18-
Base.getindex(data::MLUtils.MappedData, idx::Int) = getobs(data.f(getobs(data.data, [idx])), 1)
19-
Base.getindex(data::MLUtils.MappedData, idxs::AbstractVector) = data.f(getobs(data.data, idxs))
20-
Base.getindex(data::MLUtils.MappedData, ::Colon) = data[1:length(data.data)]
21-
22-
2317
function loss_and_accuracy(data_loader, model, device)
2418
acc = 0
2519
ls = 0.0f0

0 commit comments

Comments
 (0)