. Advertisement .
..3..
. Advertisement .
..4..
I encounter this ”input_data.read_data_sets” error when I run my program. When I looked into this, I found that input_data
wasn’t a built-in feature. I therefore got the entire folder from this site. How do I begin the instruction:
import input_data
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True)
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-6-a5af65173c89> in <module>()
----> 1 import input_data
2 mnist = tf.input_data.read_data_sets("MNIST_data/", one_hot=True)
ImportError: No module named input_data
Do I have to change my working directory to this folder I downloaded since I’m using iPython (Jupyter)? Alternatively, could I add this to my tensorflow
directory? In that case, where do I add the files?I installed tensorflow
with pip
(on my OSX) and the current location is ~/anaconda/lib/python2.7/site-packages/tensorflow/__init__.py
Are these files intended to be directly accessed by
tensorflow
, similar to sklearn
datasets? or should I simply cd into the directory and start working from there?
The cause: This error happens because you use the following code to import the MNIST data:
Solution: You can fix the problam by using the following code as the the new tutorial says: