Go to the profile of  Suraj Patidar
Suraj Patidar
Follow
I am machine learning and deep learning enthusiast.
1 min read

Training Deep Multi-Layer Perceptron model on MNIST dataset

MNIST is a large database of handwritten digits.

Training Deep Multi-Layer Perceptron model on MNIST dataset

MNIST is a large database of handwritten digits.

We are having photos of number ranging from 0 to 9 so therefore we are taking num_class =10

Splitting the data between training and testing set

Initially x_train is of shape (60000, 28, 28) and
Multi layer perceptron does not support 2D structure of data so reshaping our data

Making the values float in [0:1] instead of int in [0:255]

Displaying the shape to check is everything is up to date or not

y_train and y_test are in form of class vectors,
so now converting them from class vectors to binary class matrix i.e one_hot_vectors

Now,Defining Model Architecture