Learn practical skills, build real-world projects, and advance your career
Updated 5 years ago
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 keras.datasets import mnist
(train_images, train_labels), (test_images, test_labels) = mnist.load_data()
Using TensorFlow backend.
import jovian
jovian.log_dataset('data/mnist')
jovian.log_dataset({
'path': 'data/mnist',
'hash': 'sfsfsfasdfsdf23423',
'size': '100MB'
})
Each sample is a 28px x 28 px image, flattened out a vector of length 784 i.e. 28x28.