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'
我该如何解决这个问题?
......我无法相信我错过了,哈哈 –