Xceptions
Xceptions

Reputation: 353

Tensorflow cannot load mnist

I downloaded a copy of mnist data from a random website because the official website was down. Which directory can I put the mnist file for tensorflow's input_data method to pick it up

Upvotes: 0

Views: 244

Answers (1)

Prof.Plague
Prof.Plague

Reputation: 737

Maybe this Link help you.

Another way to use MNIST dataset: some Frameworks like Tensorflow and Keras has this dataset. So you can use this:

# Import MNIST
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)

# Load data
X_train = mnist.train.images
Y_train = mnist.train.labels
X_test = mnist.test.images
Y_test = mnist.test.labels

The sample example in here:
In Keras also its same and you can import and use. Both Frameworks download it first and then just need to import.

Upvotes: 2

Related Questions