October 2018
Intermediate to advanced
472 pages
10h 57m
English
We will load the MNIST data into our session from the keras module with mnist.load_data(). After doing so, we will print the shape and the size of the dataset, as well as the number of classes and unique labels in the dataset:
(X_train, y_train), (X_test, y_test) = mnist.load_data()print('Size of the training_set: ', X_train.shape)print('Size of the test_set: ', X_test.shape)print('Shape of each image: ', X_train[0].shape)print('Total number of classes: ', len(np.unique(y_train)))print('Unique class labels: ', np.unique(y_train))
We have a dataset with 10 different classes and 60,000 images, with each image having a shape of 28*28 and each class having 6,000 images.
Let's plot and see what the handwritten images look like: ...
Read now
Unlock full access