1
我試圖使用Tensorflow首次Tensorflow AttributeError的:「數據集」對象有沒有屬性「形象」
這裏是我的代碼,我從一個教程了:
import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf
learn = tf.contrib.learn
tf.logging.set_verbosity(tf.logging.ERROR)
mnist = learn.datasets.load_dataset('mnist')
data = mnist.train.image //THIS IS WHERE THE ERROR OCCURS
labels = np.asarray(mnist.train.labels, dtype=np.int32)
test_data = mnist.test.images
test_labels = np.asarray(mnist.test.labels, dtype = np.int32)
我得到這個錯誤在上面指定的行AttributeError: 'DataSet' object has no attribute 'image'
我該如何解決這個問題?
......我無法相信我錯過了,哈哈 –