我首先启动了tensorflow,并且正在为初学者阅读教程。没有模块名为examples.tutorials.mnist
在窗口,所以我用的Oracle VM VirtualBox,我通过https://www.tensorflow.org/versions/r0.11/get_started/os_setup.html#virtualenv-installation
由PiP的virtualenv安装,我检查tensorflow通过编译“import tensorflow by tf
”无差错运作良好。
但是,教程中,我在教程代码
没有名为examples.tutorials.mnist模块有错误,
在 “from tensorflow.examples.tutorials.mnist import input_data
”。
我找不到为什么它有这样的错误...是不是下载MNIST数据的代码?
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True)
import tensorflow as tf
x = tf.placeholder(tf.float32, [None, 784])
W = tf.Variable(tf.zeros([784,10])) # weight
b = tf.Variable(tf.zeros([10])) # bias
y = tf.nn.softmax(tf.matmul(x, W) + b)