DatasetNotFoundError: Dataset bee_dataset not found

Viewed 104

I am trying to load the bees datasets using the below code in google colab:

import tensorflow_datasets as tfds
(train_dt,test_dt), info_dt = tfds.load(name = 'bee_dataset',split=['train','test'],shuffle_files=True,as_supervised=True,with_info=True)

However, i face with the below error:

--> 129     raise DatasetNotFoundError(f'Dataset {name} not found.')
    130 
    131   builder_cls = _DATASET_REGISTRY[name]

DatasetNotFoundError: Dataset bee_dataset_150 not found.
1 Answers

You need first install tfds-nightly. (Because this dataset new adding)

pip install tfds-nightly

then you can run this code:

import tensorflow_datasets as tfds
import matplotlib.pyplot as plt
dataset = tfds.load('bee_dataset', as_supervised=True, split = 'train').batch(10)
image, _ = next(iter(dataset))
fig, axes = plt.subplots(2,5,figsize=(15,6))
for idx, axe in enumerate(axes.flatten()):
    axe.axis('off')
    axe.imshow(image[idx])
plt.show()

Output:

enter image description here

Related