我首先啓動了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)