Getting the data

In order to get to the process of building the neural networks quickly, we will be using the MNIST dataset, which is available in the MLDatasets.jl package. The package provides easy and user-friendly access to some of the datasets publicly available out there on the internet. If you don't have the MLDatasets package installed, you can do so by running the Pkg.add command:

Pkg.add("MLDatasets")

The moment the MLDatasets package is loaded, the MNIST dataset can be easily downloaded and made available with the traindata and testdata functions from the MNIST module:

using Images, ImageView, MLDatasetstrain_x, train_y = MNIST.traindata()test_x, test_y = MNIST.testdata()
The first time you make a call to any of the MLDatasets ...

Get Hands-On Computer Vision with Julia now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.