Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TensorFlow MNIST example not running with fully_connected_feed.py

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.

like image 214
Marc Delingat Avatar asked Nov 11 '15 20:11

Marc Delingat


2 Answers

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
like image 55
mrry Avatar answered Oct 18 '22 04:10

mrry


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.

like image 1
Barry Rogerson Avatar answered Oct 18 '22 03:10

Barry Rogerson