Learn practical skills, build real-world projects, and advance your career

Handwritten Digit Recognition

Objective: Classify handwritten digits from the MNIST dataset by training a convolutional neural network (CNN) using the Keras deep learning library.

Data Preparation

We begin by downloading the data and creating training & validation sets. Keras has inbuilt helper functions to do this.

from tensorflow.keras.datasets import mnist
(train_images, train_labels), (test_images, test_labels) = mnist.load_data()
import jovian

jovian.log_dataset(from_date='2019-01-01', to_date='2020-01-01', url='s3://something')
[jovian] Dataset logged.

Each sample is a 28px x 28 px image, flattened out a vector of length 784 i.e. 28x28.