import input_data MNIST tensorflow not working

前端 未结 15 1537
感情败类
感情败类 2020-12-09 14:44

TensorFlow MNIST example not running with fully_connected_feed.py

I checked this out and realized that input_data was not built-in. So I downloaded the

15条回答
  •  伪装坚强ぢ
    2020-12-09 15:26

    I am using different version - following Install on Windows with Docker here - and had similar problem.

    An easy workaround I've found was:

    1.Into the Linux command line, figure out where is the input_data.py on my Docker image (in your case you mentionned that you had to download it manually. In my case, it was already here). I used the follwing linux command:

    $ sudo find . -print | grep -i '.*[.]py'
    

    I've got the files & path

    ./tensorflow/g3doc/tutorials/mnist/mnist.py
    ./tensorflow/g3doc/tutorials/mnist/input_data.py
    

    2.launch Python and type the following command using SYS:

    >> import sys
    >> print(sys.path)
    

    you will get the existing paths.

    ['', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat']
    

    4.add the path of inputa_data.py:

    >> sys.path.insert(1,'/tensorflow/tensorflow/g3doc/tutorials/mnist')
    

    Hope that it can help. If you found better option, let me know. :)

提交回复
热议问题