Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I load MNIST data into a Google Colab Jupyter Notebook? [closed]

I've got a working environment for running Keras on Google Colab, but cannot figure out how to load MNIST data so I can import it into my program. Any suggestions greatly appreciated!

like image 885
Alex V Avatar asked Mar 04 '23 17:03

Alex V


1 Answers

Keras has built-in common datasets and MNIST is one of them:

from keras.datasets import mnist

(x_train, y_train), (x_test, y_test) = mnist.load_data()

So if you have Keras on Colab, you should also have MNIST ready to go.

like image 109
nuric Avatar answered Apr 26 '23 23:04

nuric