Skip to content

Commit

Permalink
(fix): remove depreciated function call
Browse files Browse the repository at this point in the history
MNIST.traindata() is deprecated, change fixes code to use `MNIST(split=:train)[:]` instead.
  • Loading branch information
rahulunair authored Aug 10, 2022
1 parent 287adee commit 83c4c56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/mnist_lenet.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import MLDatasets
function get_data()
xtrain, ytrain = MLDatasets.MNIST.traindata(Float32)
xtest, ytest = MLDatasets.MNIST.testdata(Float32)
xtrain, ytrain = MLDatasets.MNIST(:train)[:]
xtest, ytest = MLDatasets.MNIST(:test)[:]

(
(reshape(xtrain, 28, 28, 1, :), UInt32.(ytrain .+ 1)),
Expand Down

0 comments on commit 83c4c56

Please sign in to comment.