DatasetNotFoundError: Dataset bee_dataset not found
DatasetNotFoundError: Dataset bee_dataset not found
我正在尝试在 google colab 中使用以下代码加载 the bees datasets:
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)
但是,我遇到以下错误:
--> 129 raise DatasetNotFoundError(f'Dataset {name} not found.')
130
131 builder_cls = _DATASET_REGISTRY[name]
DatasetNotFoundError: Dataset bee_dataset_150 not found.
您需要先安装 tfds-nightly
。 (因为这个数据集是新增的)
pip install tfds-nightly
那么你可以运行这个代码:
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()
输出:
我正在尝试在 google colab 中使用以下代码加载 the bees datasets:
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)
但是,我遇到以下错误:
--> 129 raise DatasetNotFoundError(f'Dataset {name} not found.')
130
131 builder_cls = _DATASET_REGISTRY[name]
DatasetNotFoundError: Dataset bee_dataset_150 not found.
您需要先安装 tfds-nightly
。 (因为这个数据集是新增的)
pip install tfds-nightly
那么你可以运行这个代码:
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()
输出: