我剛開始使用Tensorflow,並用我的test.py文件完成了「hello world」。繼續下一步,我開始做教程(https://www.tensorflow.org/versions/master/tutorials/mnist/beginners/index.html)。 這是我做了什麼使用Tensorflow時發生錯誤Mnist
$ git clone https://github.com/tensorflow/tensorflow
並運行 「fully_connected_feed.py」
python tensorflow/examples/tutorials/mnist/fully_connected_feed.py
我有像
Traceback (most recent call last):
File "tensorflow/examples/tutorials/mnist/fully_connected_feed.py",
line 27, in
from tensorflow.examples.tutorials.mnist import input_data
ImportError: No module named examples.tutorials.mnist
的錯誤,所以我從
改變代碼的文件from tensorflow.examples.tutorials.mnist import input_data
from tensorflow.examples.tutorials.mnist import mnist
至
import input_data
import mnist
但我再次出現錯誤。
Traceback (most recent call last):
File "tensorflow/examples/tutorials/mnist/fully_connected_feed.py", line 27, in
import input_data File
"/Users/naggi/Documents/ML/tensorflow/tensorflow/examples/tutorials/mnist/input_data.py", line 29, in
from tensorflow.contrib.learn.python.learn.datasets.mnist import read_data_sets
ImportError: No module named contrib.learn.python.learn.datasets.mnist
有人可以幫我嗎? 感謝
謝謝你回答我的問題。 我運行下面的代碼 > sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl 但我有另一個錯誤 > tensorflow-0.8.0-cp27-none-linux_x86_64.whl在此平臺上不受支持。 我已經搜查,但我不明白是什麼問題 –
@NaggiGoishi你的平臺是什麼? –
這是用於Linux @NaggiGoishi –