问题
So apparently the Yann LeCun's website is down so the following lines for reading mnist with tensorflow don't seem to be working :
FROM tensorflow.examples.tutorials.mnist IMPORT input_data
mnist = input_data.read_data_sets("MNIST_data/", one_hot = true)
Any ideas how can i read the mnist without using these above lines?
回答1:
You can access the website here: https://web.archive.org/web/20160117040036/http://yann.lecun.com/exdb/mnist/ - download the data, and read it in from a local copy...
Edit Here is a code example for reading a local mnist dataset
回答2:
You can download the dataset individually and put it in the directory you created.Then the code can run normally. http://yann.lecun.com/exdb/mnist/
回答3:
Ok guys i fixed my problem,my mistake was that i was extracting the files(to the \MNIST_data directory) from the .gz files where i should have left them as they were unextracted instead.Thanks for the help.
来源:https://stackoverflow.com/questions/42927841/trouble-reading-mnist-with-tensorflow