Skip to content

Instantly share code, notes, and snippets.

@housecricket
Created May 29, 2021 08:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save housecricket/0813ef9074c8a91ab6a91844556bf87f to your computer and use it in GitHub Desktop.
Save housecricket/0813ef9074c8a91ab6a91844556bf87f to your computer and use it in GitHub Desktop.
def load_zero_nine_dataset():
# load the MNIST dataset and stack the training data and testing
# data together (we'll create our own training and testing splits
# later in the project)
((trainData, trainLabels), (testData, testLabels)) = mnist.load_data()
data = np.vstack([trainData, testData])
labels = np.hstack([trainLabels, testLabels])
# return a 2-tuple of the MNIST data and labels
return (data, labels)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment