Frage

I have a problem I hoped someone would be able to help me with regarding the tutorial at http://deeplearning.net/tutorial/gettingstarted.html#gettingstarted

I keep receiving an error when I try to run the code to load the data set, that is this code here:

import cPickle, gzip, numpy

# Load the dataset
f = gzip.open('mnist.pkl.gz', 'rb')
train_set, valid_set, test_set = cPickle.load(f)
f.close()

I am using Eclipse with PyDev and have numpy, Scipy and Theano working. I ran the command to clone the git repository and have downloaded the data set as per the instructions, however running the code above still returns

IOError: [Errno 2] No such file or directory: 'mnist.pkl.gz

I am new to python in general and this really has me stumped as I am not even sure what the cause of the problem could be, nor how what to search for in order to resolve it myself.

Thanks in advance.

War es hilfreich?

Lösung

The file mnist.pkl.gz is probably not in the same directory as the script that you are trying to run.

You would be better off receiving the actual location of the file as a command line parameter to the script and then load the file using that path

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top