15
votes

I am able to run the Deep MNIST Example fine, but when running fully_connected_feed.py, I am getting the following error:

File "fully_connected_feed.py", line 19, in <module>
from tensorflow.g3doc.tutorials.mnist import input_data ImportError: No module named
g3doc.tutorials.mnist

I am new to Python so could also just be a general setup problem.

2
Can you try editing line 19 of fully_connected_feed.py to simply do import input_data? (You might need to do the same for import mnist on the following line as well.) This looks like an issue with the tutorial, which requires you to be in a particular path. Changing the import statements should fix it. - mrry
Thank you. That solved the problem :-) - Marc Delingat

2 Answers

13
votes

This is a Python path issue. Assuming that the directory tensorflow/g3doc/tutorials/mnist is your current working directory (or in your Python path), the easiest way to resolve it is to change the following lines in fully_connected_feed.py from:

from tensorflow.g3doc.tutorials.mnist import input_data
from tensorflow.g3doc.tutorials.mnist import mnist

...to:

import input_data
import mnist
1
votes

Another alternative is to link the 'g3doc' directory from the github repo into the tensorflow python wheel folder. That way you don't need to change the code.