ローカル ディスクに保存されている画像のデータセットがあり、次のように名前を付けています。
path = '../input/resized/Resized Dataset.zip/Resized Data'
そして、次のコードを使用して fastai.vision ライブラリから ImageDataBunch のインスタンスを呼び出しています。
data = ImageDataBunch.from_folder(path, train=".", ds_tfms=get_transforms(),size=224, valid_pct=0.2)
しかし、何らかの理由でエラーが発生しています
File "../src/script.py", line 17, in <module>
data = ImageDataBunch.from_folder(path, train=".", ds_tfms=get_transforms(),size=20, valid_pct=0.2)
File "/opt/conda/lib/python3.6/site-packages/fastai/vision/data.py", line 110, in from_folder
src = src.label_from_folder(classes=classes)
File "/opt/conda/lib/python3.6/site-packages/fastai/data_block.py", line 463, in _inner
self.train = ft(*args, from_item_lists=True, **kwargs)
File "/opt/conda/lib/python3.6/site-packages/fastai/data_block.py", line 292, in label_from_folder
label_cls=label_cls, **kwargs)
File "/opt/conda/lib/python3.6/site-packages/fastai/data_block.py", line 287, in label_from_func
return self._label_from_list([func(o) for o in self.items], label_cls=label_cls, **kwargs)
File "/opt/conda/lib/python3.6/site-packages/fastai/data_block.py", line 262, in _label_from_list
label_cls = self.get_label_cls(labels, label_cls=label_cls, **kwargs)
File "/opt/conda/lib/python3.6/site-packages/fastai/data_block.py", line 251, in get_label_cls
it = index_row(labels,0)
File "/opt/conda/lib/python3.6/site-packages/fastai/core.py", line 250, in index_row
3.5s
3
return a[idxs]
IndexError: index 0 is out of bounds for axis 0 with size 0
複数の異なるデータセットを使用しましたが、同じ問題があります