The fashion-mnist dataset is already available in the keras library. Just load the appropriate library and then load the data:
from keras.datasets import fashion_mnist
At this point, we will load the data. The data is divided into input (X) and output (Y); the data was also split into the data we will use for train (training) so that we can test the model (test):
(XTrain, YTrain), (XTest, YTest) = fashion_mnist.load_data()
The following tuples are returned:
- XTrain, XTest: uint8 array of grayscale image data with shape (num_samples, 28, 28)
- YTrain, YTest: uint8 array of labels (integers in range 0-9) with shape (num_samples)
Now, let's check the size of the imported data by executing the following line:
print("X train ...