Hvass-Labs / TensorFlow-Tutorials

TensorFlow Tutorials with YouTube Videos

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AttributeError: 'DataSet' object has no attribute 'cls'

atinesh-s opened this issue · comments

Getting an error while reading MNIST data in
"TensorFlow-Tutorials/02_Convolutional_Neural_Network.ipynb"

cls_true = data.test.cls[0:9]
AttributeError: 'DataSet' object has no attribute 'cls'

I'm using Tenserflow Version: '1.3.0'

did you type data.test.cls = np.argmax(data.test.labels, axis=1) before? If not, you can try it. Hope it's helpful to you.

Thanks kjzhang9 it worked

just reference, Concept is Add a variable to a class instance at runtime .

Thanks