与Tensorflow Mnis有误差

2024-04-16 21:07:32 发布

您现在位置:Python中文网/ 问答频道 /正文

我刚刚开始使用Tensorflow,我用test.py文件完成了“hello world”。接下来,我开始做教程(https://www.tensorflow.org/versions/master/tutorials/mnist/beginners/index.html)。 这就是我所做的

$ 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

有人能帮我吗? 谢谢


Tags: frompyimportinputdatatensorflowfeedline