Quantcast
Viewing all articles
Browse latest Browse all 14069

How do I select only a specific digit from the MNIST dataset provided by Keras?

I'm currently training a Feedforward Neural Network on the MNIST data set using Keras. I'm loading the data set using the format

(X_train, Y_train), (X_test, Y_test) = mnist.load_data()

but then I only want to train my model using digit 0 and 4 not all of them. How do I select only the 2 digits? I am fairly new to python and can figure out how to filter the mnist dataset...


Viewing all articles
Browse latest Browse all 14069

Trending Articles