October 2018
Intermediate to advanced
472 pages
10h 57m
English
Let's import the mnist module that's available in keras with the following code:
from keras.datasets import mnist
Then, unpack the mnist train and test images with the following code:
# unpack mnist data(X_train, y_train), (X_test, y_test) = mnist.load_data()
Now that the data has been imported, let's explore these digits:
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))
The following is the output of the preceding code:
From the preceding screenshot, we can see that we have ...
Read now
Unlock full access