How to load the MNIST dataset with TensorFlow / Keras?

Ask Questions Forum: ask Machine Learning Questions to our readersCategory: Deep LearningHow to load the MNIST dataset with TensorFlow / Keras?
1 Answers
Best Answer
Chris Staff answered 1 year ago

Keras makes available a set of default datasets among which the MNIST dataset. Loading the MNIST dataset for usage in your Machine Learning model is therefore really easy:

from tensorflow.keras.datasets import mnist
(x_train, y_train), (x_test, y_test) = mnist.load_data()

Your Answer

8 + 12 =