I am following the tutorial for creating an image classifier using the TensorFlow Lite Model Maker found here: https://www.tensorflow.org/lite/tutorials/model_maker_image_classification#simple_end-to-end_example. Even though I am following the tutorial exactly, I can't images from the loaded data sets to display. Here's the relevant code and error message: error code: AttributeError: 'ImageClassifierDataLoader' object has no attribute 'dataset'
Why is this happening and how do I fix this?
plt.figure(figsize=(10,10))
for i, (image, label) in enumerate(data.dataset.take(25)):
plt.subplot(5,5,i+1)
plt.xticks([])
plt.yticks([])
plt.grid(False)
plt.imshow(image.numpy(), cmap=plt.cm.gray)
plt.xlabel(data.index_to_label[label.numpy()])
plt.show()
AttributeError Traceback (most recent call last)
<ipython-input-9-160e876048da> in <module>()
1 plt.figure(figsize=(10,10))
----> 2 for i, (image, label) in enumerate(data.dataset.take(25)):
3 plt.subplot(5,5,i+1)
4 plt.xticks([])
5 plt.yticks([])
AttributeError: 'ImageClassifierDataLoader' object has no attribute 'dataset'