In line 3 the images are loaded with the function load_data() and stored in Numpy-Arrays. First, the data is divided into data for training (x_trin, y_train) and data for testing (x_test, y_test). The test data must be different from the training data.

In x is the actual handwritten image and in y the corresponding label, the correct number.